STM32GENERIC, my arduino implementation

Cores are the underlying magic that make the Arduino API possible
fpiSTM
Posts: 89
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: STM32GENERIC, my arduino implementation

Post by fpiSTM » Wed Apr 19, 2017 4:07 pm

Hi @danieleff,

It's funny, I'm currently do a similar work to have only one repo for STM32 boards (currently F0/F4 ok. F3/L4/L0 on going) :)

Nice work indeed.

FYI, you could use the Arduino CMSIS package (4.5.0) instead of having CMSIS in your repo.

danieleff
Posts: 302
Joined: Thu Sep 01, 2016 8:52 pm
Location: Hungary
Contact:

Re: STM32GENERIC, my arduino implementation

Post by danieleff » Wed Apr 19, 2017 7:53 pm

Hello

Yes I think it is best to have only one repo for every chip.
For example I just added and tested on F746, and analogread/write, Serial, SPI seems to be working fine with the same codebase.

The biggest problem is the arduino included 4.8.3 arm compiler does not know what '-mcpu=cortex-m7' is... So could only test from Eclipse.
Might have to create a boards manager package for it.

michael_l
Posts: 336
Joined: Mon Aug 24, 2015 6:11 pm

Re: STM32GENERIC, my arduino implementation

Post by michael_l » Fri Apr 21, 2017 4:36 pm

I just got F407VG Discovery so I can test it with your core if you add the variant. Thanks.

danieleff
Posts: 302
Joined: Thu Sep 01, 2016 8:52 pm
Location: Hungary
Contact:

Re: STM32GENERIC, my arduino implementation

Post by danieleff » Fri Apr 21, 2017 6:26 pm

Hello, added F407 discovery, altough I dont have one, so only using the documentation. Would be cool if leds worked on PD12..PD15. Than hopefully serial USB. Try to get that accelerometer working somehow, but I dont have SPI protocol for that. Finally I2S, though theres nothing for that now.

michael_l
Posts: 336
Joined: Mon Aug 24, 2015 6:11 pm

Re: STM32GENERIC, my arduino implementation

Post by michael_l » Fri Apr 21, 2017 7:09 pm

Thanks, that was quick! I'll try that this weekend. It is quite close to black 407 but has some differences in pins.

Yes, that board has some interesting chips like 24-bit DAC, microphone accelerometer. Tried also to search code for that accelerometer but couldn't find. If it uses (didn't check yet) SPI it must be quite simple. I would believe code and specs is there somewhere in ST.com site just have to find it.

What would be cool is to have USB MSC working and "mount SD card" underneath it so its available for user to browse files

danieleff
Posts: 302
Joined: Thu Sep 01, 2016 8:52 pm
Location: Hungary
Contact:

Re: STM32GENERIC, my arduino implementation

Post by danieleff » Sat Apr 22, 2017 7:00 am

MSC is definitely possible using STM32 middleware. However it is not designed to handle multiple interfaces (CDC+MSC), so...

I added preliminary SDIO, and an example to list, read, write files using the Black F407 SD onboard connector with SdFat-beta.
It needs a sdfat-beta config file change (because BlockDriver is typedefed based on a macro. I dont understand why it is not a template parameter), and lot of things not yet implemented (card size, manufacturer, ...), however it is testable.

zmemw16
Posts: 1265
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: STM32GENERIC, my arduino implementation

Post by zmemw16 » Sat Apr 22, 2017 8:32 am

These are connector details for STM32F407ZGT 'Devils Cross' black board: J6 / J7 / DS
Definitely generic as I2C and Flash pads are empty
The actual silk screen has some nice white dots and text on the underside for each, LED0 / LED1 / KEY1 / KEY2 etc

Hope of interest/use
Stephen
Attachments
STM32F407ZGT6-Devil CrOSS.csv
(1.73 KiB) Downloaded 8 times
STM32F407ZGT6-Devil CrOSS.ods
(12.56 KiB) Downloaded 9 times

michael_l
Posts: 336
Joined: Mon Aug 24, 2015 6:11 pm

Re: STM32GENERIC, my arduino implementation

Post by michael_l » Sat Apr 22, 2017 9:28 am

First time compile resulted in following error under windows. Seems the ST-LINK_CLI.exe is missing from repo.

Code: Select all

C:\Users\michael\Documents\Arduino\hardware\STM32GENERIC/tools/win/stlink_upload.bat COM17 {upload.altID} {upload.usbID} C:\Users\michael\AppData\Local\Temp\arduino_build_480449/Blink.ino.bin 
'stlink\ST-LINK_CLI.exe' is not recognized as an internal or external command,
operable program or batch file.

Another thing I'm wondering is why does the board not power up from the bottom micro-USB connector ? It does power up from mini-USB on the top which powers ST-LINK.

michael_l
Posts: 336
Joined: Mon Aug 24, 2015 6:11 pm

Re: STM32GENERIC, my arduino implementation

Post by michael_l » Sat Apr 22, 2017 10:19 am

Just tested and leds PD12-PD15 work okay with F4 Discovery. USB Serial works also

zmemw16
Posts: 1265
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: STM32GENERIC, my arduino implementation

Post by zmemw16 » Sat Apr 22, 2017 11:56 am

<EDIT>
Oops forgot to say
Linux Debian Jessie 8.x Lenovo Y50 I7 16Gb
</EDIT>

Serial port is identified as MapleMini F103CB
Repo as 0830 this morning.

Black F407VE USB Virtual
Serial Comms Automatic
USB Virtual Com
STLink Automatic SerialUSB

stephen
Last edited by zmemw16 on Sat Apr 22, 2017 8:24 pm, edited 2 times in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest