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

acronis Fri Jun 16, 2017 1:47 pm

I have done so .
The library just now installed.
#include <libmaple/fsmc.h> more not prescribed

#include <libmaple/FCSM.h> ???? true name ???
FSMC.h ???

stevestrong Fri Jun 16, 2017 2:41 pm

Sorry, but it is still not clear what you intend to do with FSMC.h or FCSM.h

As I told, you do not have to include any additional header file, the graphic test should run out of the box with FSMC activated.
If you want to disable it, then comment out line 15 of the graphics lib header file.

acronis Fri Jun 16, 2017 3:07 pm

Great !
It worked !
Super !
THANK you !

acronis Fri Jun 16, 2017 3:17 pm

Tell me more please , where to download a working example for SD Card-based generic_F4 branch of my repo

stevestrong Fri Jun 16, 2017 3:30 pm

Glad that it worked.

SdFat examples are available in the original SdFat source directory of Bill Greiman on github, please search for it and download it, then place it to library folder of the Arduino working directory.

Currently only the SPI interface is working with SD-cards, you have to choose one SPI port and connect an extra SD-card module to it.
For that please check the SdFat help, it provides information how to use it with STM32.

The on-board SD card slot usage is only possible when using the SDIO interface.
Which is currently under evaluation phase, basically is working very stable, but I need to make more tests to be sure that it works under any circumstance.

acronis Fri Jun 16, 2017 3:33 pm

I’m interested in is The on-board SD card slot.
We expect from You information about the testing

acronis Fri Jun 16, 2017 3:35 pm

And tell me which library is better to use for working with clocks (RTC) this Board ?

stevestrong Fri Jun 16, 2017 3:37 pm

acronis wrote:And tell me which library is better to use for working with clocks (RTC) this Board ?

acronis Tue Jul 04, 2017 8:17 am

Hello.

Your library on the STM32F407VET6 wonderful ! Now I work and display and SD CARD (SDIO)!!!

But I can not deal with the internal rtc for this Board.
Please give a simple working example for this Board.

I really need time and date for the my project.

acronis Tue Jul 04, 2017 8:44 am

Great !
I will wait for your news about the black F4 RTC Board battery on Board.

library already in the repository, and I’ll try to check.

stevestrong Tue Jul 04, 2017 5:44 pm

Meanwhile I deleted the generic_F4 branch, so that the master branch will have the latest developments. I updated the first post, too.

vitor_boss Thu Jul 06, 2017 5:17 am

To enable FPU need few things. Insert this on Start_c.c
#if (__ARM_PCS==1 || __ARM_PCS_VFP==1) //using FP on code?
#if defined (__FP_FAST_FMAF) //mfloat-abi=hard or mfloat-abi=softfp
#warning enabling harware fpu
__asm volatile
(
" ldr.w r0, =0xE000ED88 \n" /* The FPU enable bits are in the CPACR. */
" ldr r1, [r0] \n" /* read CAPCR */
" orr r1, r1, #( 0xf << 20 )\n" /* Set bits 20-23 to enable CP10 and CP11 coprocessors */
" str r1, [r0] \n" /* Write back the modified value to the CPACR */
" dsb \n" /* wait for store to complete */
" isb" /* reset pipeline now the FPU is enabled */
);
#else
#warning software or no floating point
#endif
#endif

vitor_boss Thu Jul 06, 2017 5:42 am

There is a macro missing from arduino Word(h,l);
Just insert those lines on wirish_math.h on line 36
#include <stdint.h>

acronis Thu Jul 06, 2017 9:03 am

Hello.
Can you show an example for the RTC in your library

If I connect the library #include <RTClock.h> error
The maintainer is missing from libraries C:\Users\Admin\Documents\Arduino\hardware\Arduino_STM32-master\STM32F4\libraries\RTClock

vitor_boss Fri Jul 07, 2017 1:36 am

https://github.com/Marzogh/SPIFlash
This lib works on STM32GENERIC, with yours I’m getting no lucky.

EDIT: Default EEPROM is W25Q16, I have to replace mine because was return wrong numbers, now is W25Q64.

stevestrong Mon Jul 10, 2017 5:15 pm

First post updated with following info:

EDIT – 2017.07.10
RTC lib reworked to be independent from other time libraries. Tested on balck F4V board. Includes an example sketch to set the RTC time.

acronis Tue Jul 11, 2017 6:29 am

I added to the end of the file library.properties string maintainer= and the error is Missing ‘maintainer’ from the library disappeared. The library has connected fine.
Whether it is possible to add to Your library ?

acronis Tue Jul 11, 2017 7:14 am

RTClock rtc;
time_t tt;
tm_t tm;
int hh; // hour

rtc.getTime(tm);
hh = tm.hour();
error: expression cannot be used as a function

Wrong did.
hh = tm.hour;

So right and works !
Thank you !

Sign in to reply