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

stevestrong Sun Oct 15, 2017 4:10 pm

Oh well, I see your point, there are many places which use ADC as a pointer and not as the structure address.
The ideal solution would be to change the ADC module of F4 to be compatible with F1.
Till then, you can replace ADCx by (&ADCx).

acronis Sun Oct 15, 2017 11:32 pm

Hello Steven !

I hear You.
You did a great job by adding support STM32F4.
I really hope that You will be able to add support for ADC on this Board.

acronis Thu Oct 19, 2017 11:37 am

Hello Steven

Rewrote all the code in &ADCx, but the error persists

dataPoints[j+1] = &ADC2->regs->DR & ADC_DR_DATA;

base operand of ‘->’ has non-pointer type ‘const adc_dev’

In this line, correct the code ?

stevestrong Thu Oct 19, 2017 12:13 pm

Use the brackets correctly:
dataPoints[j+1] = (&ADC2)->regs->DR & ADC_DR_DATA;

acronis Fri Oct 20, 2017 11:54 am

Hello Steven.

I was able to do as you told me.
The error no longer exists.

But ADC is not working correctly, the values are constantly jumping (subject to change).
I tried to connect the ADC pin to GND and VCC, the values still vary over a wide range.
Tried using analogRead () all the same – value jump from the lower to the upper limit.

Why doesn’t ADC ?
It is possible as that to solve ?

stevestrong Fri Oct 20, 2017 12:01 pm

[acronis – Fri Oct 20, 2017 11:54 am] –
It is possible as that to solve ?

Very probable that it can be solved.
Just the necessary time is missing…

acronis Fri Oct 20, 2017 12:05 pm

Thank You for Your tremendous work.
You have so much done !!!
You’re probably only ADC !
We will wait for a quick solution.

Thank You again.

acronis Mon Oct 23, 2017 3:06 pm

stevestrong thank you very much for the help !
It worked on another pine !

acronis Wed Nov 08, 2017 12:35 pm

Hello steven.
Not if You managed to adapt the I2C for this Board?

stevestrong Wed Nov 08, 2017 1:15 pm

Not for this board, but maybe for the generic mini, there is an I2C EEprom on board.
Only time is missing…

acronis Wed Nov 08, 2017 1:54 pm

Eh…

I don’t have enough I2C to connect various sensors to the Board STM32F4 BLACK….

You are amazing !
I hope that You will eventually make !
Thank YOU !

Thanks to You I have a lot of things connected to this boards: ADC,RTC,display (FCSM LCD-16bit), Ethernet (W5500), SD card (sdio), NRF24L01 , sensors on SPI and others…

there is only I2C…..

stevestrong Tue Nov 14, 2017 7:55 pm

Short update: I managed to implement the USB serial connection status detection, so that
while(!Serial);

RogerClark Tue Nov 14, 2017 8:07 pm

[stevestrong – Tue Nov 14, 2017 7:55 pm] –
Short update: I managed to implement the USB serial connection status detection, so that
while(!Serial);

stevestrong Tue Nov 14, 2017 8:13 pm

As you know, i am not able to make clean prs, but i will try it.
Can’t you simply merge from my patch?

RogerClark Tue Nov 14, 2017 8:18 pm

No worries

I will try to merge the patch

stevestrong Tue Nov 21, 2017 9:24 am

[acronis – Wed Nov 08, 2017 1:54 pm] –
Thanks to You I have a lot of things connected to this boards: ADC,RTC,display (FCSM LCD-16bit), Ethernet (W5500), SD card (sdio), NRF24L01 , sensors on SPI and others…

there is only I2C…..

I2C (Wire) is finally working, see http://stm32duino.com/viewtopic.php?f=3 … 379#p37376

acronis Sat Nov 25, 2017 9:32 am

I2C (Wire) is finally working

WOW !
SUPER !!!

Steve – thank you so much !

Nutsy Tue Jan 16, 2018 1:01 pm

I have the ZGT6 black board… and im having this problem too… No Com port shows up when connected to USB, setting BOOT0 high put it into dfu mode.

However, the main issue I have here is while yes this is a combersom way to upload firmware when your doing loads of debugging and constant reuploads…

How is one meant to use the serial monitor to read the readouts of my debugging if the chip doesnt do the virtual com port?

Should I just stick to using the hardware serial and a usb serial adaptor? If so, can i upload firmware via that?

stevestrong Tue Jan 16, 2018 1:15 pm

If you use Roger’s or my repo, in the Arduino IDE you have options for USB function, you can select between:
– USB inactive (unfortunately on first place),
– USB serial (CDC), or
– USB MSC (not implemented).
Please check your option.
I usually enable USB serial and upload with STLink, not USB DFU, I find cumbersome to switch the BOOT1 jumper all over again to different position.
And STLink does not work as USB serial interface, you need an extra USB cable between the micro USB socket and PC.

Anyway, if you debug with STLInk, the USB serial will most probably not work when you stop the program, the USB protocol is sensitive on breaks longer than 20ms and will stop the interface communication.

Nutsy Tue Jan 16, 2018 3:15 pm

I have the black board not the stm discovery… Can i use the discovery 407 core then?

Sign in to reply