Spark Logic

[libmaple] Black F407VET6

stevestrong Wed Apr 12, 2017 4:37 pm

The master branch of my repo contains the latest developments for F4, so I recommend to use this if somebody wants to test it with Arduino IDE or PlatformIO.
Supported board variants: generic F4 (tested), generic F4 mini (tested), disco F407 (compiles but not tested).

Some basic information about the board can be found on wiki: http://wiki.stm32duino.com/index.php?title=STM32F407

Currently working:
– GPIOs + LED toggle
– USB serial and serial 1,2,3. Evaluated USB serial speed, Tx: ~800kBps
– SPI (1,2,3) with DMA (also for SD cards using latest SdFat lib made by Greiman), extended DMA functions
– FSMC (adapted for driving 16 bit parallel LCDs) http://stm32duino.com/viewtopic.php?f=39&t=2298#p31037
– SDIO [non-HAL implementation] (for SD cards using latest SdFat lib made by Greiman) http://stm32duino.com/viewtopic.php?f=39&t=2215
– RTC – reworked, does not need any extra time library
– I2C (Wire) viewtopic.php?f=39&t=2804&p=37376#p37376
– supports W5500-based Ethernet modules (see viewtopic.php?f=13&t=503&p=32063#p32063)
– DAC, see viewtopic.php?f=39&t=1976&p=41564#p41564
– ADC, see http://stm32duino.com/viewtopic.php?f=3 … 720#p42720
– DCMI, see viewtopic.php?f=39&t=3414&p=43358#p43358
– CAN, see: http://stm32duino.com/viewtopic.php?f=3 … 239#p49235

Todo:
– port the new (faster) version of SDIO from Victor (https://github.com/rogerclarkmelbourne/ … 2/pull/474)
– check the on-board W25Q64 SPI flash, maybe add SPIflash lib to repo (where from?) https://github.com/LowPowerLab/SPIFlash
– check/add FPU (http://stm32duino.com/viewtopic.php?f=39&t=2001, http://stm32duino.com/viewtopic.php?f=3 … 048#p31040)
– add support for Seed Arch Max board
– add Ethernet lib (usable with Seeed Arch Max board)

EDIT – 2018.10.02
– added extended SPI DMA functions, see: viewtopic.php?f=15&t=3415

EDIT – 2018.09.12
– working CAN, see: http://stm32duino.com/viewtopic.php?f=3 … 239#p49235 (thanks to @michael_i!)

EDIT – 2018.03.19
– tested ADC, see: http://stm32duino.com/viewtopic.php?f=3 … 720#p42720

EDIT – 2018.02.18
– tested DAC, see: viewtopic.php?f=39&t=1976&p=41564#p41564

EDIT – 2018.01.16
– Added I2C (Wire), see: viewtopic.php?f=39&t=2804&p=37376#p37376

EDIT – 2017.07.10
– RTC lib reworked to be independent from other time libraries. Includes an example sketch to read and set the RTC time, as well as how to use the time elements.
It can be downloaded from here: viewtopic.php?f=39&t=775&p=31218#p31218

EDIT – 2017.06.18
– Implemented SDIO [non-HAL implementation] (for SD cards using latest SdFat lib made by Greiman)
viewtopic.php?f=39&t=2215

EDIT – 2017.06.02

Upload under windows currently only possible with STLink (V2).
When BOOT0=”1″(3.3V) and BOOT1=”0″(GND), the chip is recognized by Win10 as ‘STM Device in DFU mode’ (USB\VID_0483&PID_DF11).
However, there is no working DFU loader for Windows available, yet.

Comments & suggestions are welcome in this thread.
Any bug reports & PRs in Github, please.

————————————————————————————-
Hi all,

I know there is another thread on vet6 & zet6 boards, but there are at least 2 type of boards mixed, with partially different information.
And there is a lot of other information spread over other threads, like this generic implementation from danieleff.
Wiki has some basic stuff, too (thanks, Palmer!).

So, I got my black board today and I though it makes sense to open a separate thread only for the black VET6 board. The title can be edited later if needed, and the useful and tested information can (should) be added to wiki.

First of all, this is the current situation:
Both LEDs blink, but the USB device descriptor failed (VID 0x000 PID 0x0002).
On the serial port (115200Baud, 8N1) I receive after each reset: “LCD ID:ffff”
I can connect with the ST-Link probe, and I could read out the flash (I can attach here or to wiki if wanted). I assume writing would be also possible.

Now would like to start with the sw development.
The question is: how?

I know, there are a lot of alternative options (the official STM32 core, Start Otto github, Koduino, and so on).
But honestly, I like very much the existing Arduino_STM32 repo and I would like to use this for my future work.
I also know, it will be a hard way to go. But I think, with small steps I (we?) can achieve great results.

So, will the Arduino_STM32 provide the basic structure and functionality for a blinky example?
If anyone tried that already and had success, I would appreciate a short description of what and how to do.

For the beginning I intend to use the STlink upload method as the USB DFU seems not (yet?) to work.
Is there any working bootloader available for this board?

Replies

ag123 Fri Jun 02, 2017 7:30 am

vitor_boss wrote:That board don’t need any bootloader? I didn’t found any consistent answer.

What repo should I use for this board? I just got it.

ag123 Fri Jun 02, 2017 1:57 pm

i’m running on an older copy of the libmaple f4 dev, i’d need to ‘refresh’ my copy but it’d break some sketches i’m meddling with currently. hence i’d defer to steve to answer about the errors. i’m not too sure about the errors myself short of compiling and trying it out.

as for stm’s core try palmerr’s version instead, that’s sort of tailored for the stm32f407 black board

stm32generic accordingly has got quite a bit of developments done for it recently, e.g. some SDIO stuff is being tested,
and pito achieved a whopping 14MB per secs to a sammy class 10 sd card recently. it is worth checking out
http://www.stm32duino.com/viewtopic.php … 058#p28977

stevestrong Fri Jun 02, 2017 3:16 pm

vitor, thanks for finding this error.
Please replace that line 6 in variant.h by:
#define digitalPinToBitMask(P) ( BIT(P&0x0F) )

vitor_boss Fri Jun 02, 2017 3:46 pm

stevestrong wrote:vitor, thanks for finding this error.
Please replace that line 6 in variant.h by:
#define digitalPinToBitMask(P) ( BIT(P&0x0F) )

stevestrong Fri Jun 02, 2017 3:50 pm

Sorry, but I cannot follow these errors.
I just checked out the Black_F4 branch, and I compiled the blink sketch, without any error/warning.
Which IDE are u using?

stevestrong Fri Jun 02, 2017 5:49 pm

For those who want to try out the libmaple F4 repository, I updated the first port in this thread with new information, please check it out.

vitor_boss Fri Jun 02, 2017 8:00 pm

stevestrong wrote:Sorry, but I cannot follow these errors.
I just checked out the Black_F4 branch, and I compiled the blink sketch, without any error/warning.
Which IDE are u using?

stevestrong Fri Jun 02, 2017 8:42 pm

I updated the first post with upload information.

vitor, if you still have problems, please post here the Arduino build output.
Which sketch do you try to build? As I told, it builds fine for me (on Win10 64b).

vitor_boss Fri Jun 02, 2017 9:07 pm

stevestrong wrote:I updated the first post with upload information.

vitor, if you still have problems, please post here the Arduino build output.
Which sketch do you try to build? As I told, it builds fine for me (on Win10 64b).

stevestrong Fri Jun 02, 2017 9:10 pm

In Arduino IDE, you have to select Tools->Boards->”Generic STM32F407V series”, and after that the Tools->USB Configuration->USB serial (CDC), if you want to have serial over USB.

stevestrong Fri Jun 02, 2017 9:15 pm

You are certainly not using the right software package (branch) because the HardwareSPI stuff should not exist at all in my latest version…
check here: https://github.com/stevstrong/Arduino_S … e/libmaple
Please do a clean install (download & extract) of the mentioned branch.

vitor_boss Fri Jun 02, 2017 9:27 pm

My bad, I did a dirty install, but I had downloaded from your master branch earlier

One last question, what library is used on PlatformIO?

edit: Blink sketch uses 11904 bytes of RAM, is that right? maple mini uses 8K

vitor_boss Sat Jun 03, 2017 12:49 am

Using the board Serial and a generic USB Serial converter with ‘Flash Loader Demo’ application is possible to write binaries on processor

vitor_boss Tue Jun 06, 2017 8:06 pm

stevestrong wrote:You are certainly not using the right software package (branch) because the HardwareSPI stuff should not exist at all in my latest version…
check here: https://github.com/stevstrong/Arduino_S … e/libmaple
Please do a clean install (download & extract) of the mentioned branch.

acronis Fri Jun 16, 2017 1:10 pm

Hello.

IDE 1.8.2 , you have the library installed stevestrong has the libraries for 16 bit parallel display and https://github.com/stevstrong/Adafruit_ … 6bit_STM32 https://github.com/stevstrong/Arduino_S … F4_variant . example Graphisctest. error

In file included from C:\Users\VIC\ Documents\Arduino\\libraries Adafruit_TFTLCD_16bit_STM32-master\examples\graphicstest\graphicstest.ino:7:0:

C:\Users\VIC\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32-master\src/Adafruit_TFTLCD_16bit_STM32.h in the void writeCommand function '(uint16_t)':

C:\Users\VIC\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32-master\src/Adafruit_TFTLCD_16bit_STM32.h:64:22: error: 'fsmcCommand' was not declared in this area

#define lcdCommand (*fsmcCommand)

^

C:\Users\Виктор\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32-master\src/Adafruit_TFTLCD_16bit_STM32.h:68:27 note: in expansion of macro 'lcdCommand'

#define writeCmd(d) { lcdCommand = d; } //(l&0x00FF); }

^

C:\Users\VIC\Documents\Arduino\libraries\Adafruit_TFTLCD_16bit_STM32-master\src/Adafruit_TFTLCD_16bit_STM32.h:200:2 note: in expansion of macro writeCmd"

writeCmd ();

stevestrong Fri Jun 16, 2017 1:14 pm

Please check the very first post of this thread, there is written to use another branch, the generic_f4, which contains the latest developments, also support for FSMC, which the black_f4 branch does not include.

acronis Fri Jun 16, 2017 1:29 pm

set . error
C:\Users\51FB~1\appdata\local\temp\arduino_modified_sketch_882808\graphicstest.Ino:1:28: fatal error: libmaple/FCSM.h: no such file or directory

#include <libmaple/FCSM.h>

stevestrong Fri Jun 16, 2017 1:38 pm

You don’t have to extra include the FSMC header into the sketch, because it is done automatically within the “Adafruit_TFTLCD_16bit_STM32.h” header file, line 56.

And please do a clean extract of the downloaded ZIP files (both Adafruit 16 bit parallel lib and generic_f4 branch), delete any existing previous files/folders.

Sign in to reply