Sticky: STM32F4 boards – limited support

RogerClark
Wed Apr 29, 2015 10:43 pm
The majority of the development effort has been put into the STM32F103 version.

The STM32F4 version is taken from an old port of the original LeafLabs libmaple core, to F4 by the Aeroquad team.

Unlike the STM32F1 section, the F4 code has not been reworked to bring it up to the level of the Arduino 1.0 API, which means that a lot of the API calls you take for granted in the API are not present, also complete classes (Stream) are not implemented in the F4 version yet.

What needs to happen, is for the major restructuring that I did to the STM32F1 code to be applied to the F4 code, however I think an easier method to do the update, would probably be to make a copy of the F1 code, and then replace the files that were F1 hardware specific, with the files from the F4 folder.

However, its probably at least a whole day’s work, possibly more. I currently don’t personally have time to update the F4 code, but I’d be happy to answer questions from anyone who wanted to take the task on !

I did some basic tests, on a STM32F407 Discovery board, and GPIO works, however I was not able to get Serial to work (but this doesn’t necessarily mean its not working)

PS.
In the longer term, the goal should be to merge the F1 and F4 folders, but thats a long way off at the moment, and would require even more restructuring and code changes in both the STM32F1 and STM32F4 folders for this to be possible.


victor_pv
Sat May 02, 2015 3:51 am
Hi Roger, should the Nucleo F411 work? if so, how does the upload work? thru st-link or I need to use the serial bootloader?

stevech
Sat Apr 02, 2016 8:08 pm
another option may be the ROM bootloader that can be enabled via the BOOT0, BOOT1 pins.
An extract from the reference manual is below.

Many of the STM32F’s have a bootloader in ROM, and the available serial interfaces it uses vary by chip type. Below are for the ‘411 chip.
ST has a free host-side loader, and the protocol is open source if you must DIY. For development, I use ST-Link which is internal to the IDE I use. But some users will prefer using a bootloader.

2016-04-02_130546.jpg
2016-04-02_130546.jpg (172.39 KiB) Viewed 14465 times

Touseef
Sat Jun 04, 2016 11:42 am
Roger could you please send me the code for STM32F407 Discovery for the GPIO and the instruction on how to upload that code using latest versions of Arduino IDE.

AnalogLamb
Mon Sep 12, 2016 9:06 am
RogerClark wrote:The majority of the development effort has been put into the STM32F103 version.

The STM32F4 version is taken from an old port of the original LeafLabs libmaple core, to F4 by the Aeroquad team.

Unlike the STM32F1 section, the F4 code has not been reworked to bring it up to the level of the Arduino 1.0 API, which means that a lot of the API calls you take for granted in the API are not present, also complete classes (Stream) are not implemented in the F4 version yet.

What needs to happen, is for the major restructuring that I did to the STM32F1 code to be applied to the F4 code, however I think an easier method to do the update, would probably be to make a copy of the F1 code, and then replace the files that were F1 hardware specific, with the files from the F4 folder.

However, its probably at least a whole day’s work, possibly more. I currently don’t personally have time to update the F4 code, but I’d be happy to answer questions from anyone who wanted to take the task on !

I did some basic tests, on a STM32F407 Discovery board, and GPIO works, however I was not able to get Serial to work (but this doesn’t necessarily mean its not working)

PS.
In the longer term, the goal should be to merge the F1 and F4 folders, but thats a long way off at the moment, and would require even more restructuring and code changes in both the STM32F1 and STM32F4 folders for this to be possible.


AnalogLamb
Mon Sep 12, 2016 9:09 am
RogerClark wrote:The majority of the development effort has been put into the STM32F103 version.

The STM32F4 version is taken from an old port of the original LeafLabs libmaple core, to F4 by the Aeroquad team.

Unlike the STM32F1 section, the F4 code has not been reworked to bring it up to the level of the Arduino 1.0 API, which means that a lot of the API calls you take for granted in the API are not present, also complete classes (Stream) are not implemented in the F4 version yet.

What needs to happen, is for the major restructuring that I did to the STM32F1 code to be applied to the F4 code, however I think an easier method to do the update, would probably be to make a copy of the F1 code, and then replace the files that were F1 hardware specific, with the files from the F4 folder.

However, its probably at least a whole day’s work, possibly more. I currently don’t personally have time to update the F4 code, but I’d be happy to answer questions from anyone who wanted to take the task on !

I did some basic tests, on a STM32F407 Discovery board, and GPIO works, however I was not able to get Serial to work (but this doesn’t necessarily mean its not working)

PS.
In the longer term, the goal should be to merge the F1 and F4 folders, but thats a long way off at the moment, and would require even more restructuring and code changes in both the STM32F1 and STM32F4 folders for this to be possible.


martinayotte
Mon Sep 12, 2016 1:59 pm
There is not much specific procedures to follow while implementing new libraries.
Simply start doing some code inspiring yourself with all the Arduino libs available on the Internet.

What kind of libraries are you planning to develop ?


RogerClark
Mon Sep 12, 2016 9:59 pm
Please read this announcement

viewtopic.php?f=16&t=1398


AnalogLamb
Tue Sep 13, 2016 1:50 am
martinayotte wrote:There is not much specific procedures to follow while implementing new libraries.
Simply start doing some code inspiring yourself with all the Arduino libs available on the Internet.

What kind of libraries are you planning to develop ?


RogerClark
Tue Sep 13, 2016 3:28 am
Koduino does support some F4 boards but only a few

I have contacted Avik De who runs Koduino and he is very interested in the new STM core, so I would wait and see what STM release, later this week.


AnalogLamb
Mon Sep 19, 2016 9:03 am
RogerClark wrote:Koduino does support some F4 boards but only a few

I have contacted Avik De who runs Koduino and he is very interested in the new STM core, so I would wait and see what STM release, later this week.


RogerClark
Mon Sep 19, 2016 10:00 am
This is not the right place for this info about the board, I think you already posted details elsewhere, I will delete your posting to this thread

Zingg_JM
Thu Feb 16, 2017 4:09 pm
Hi

I do not know if this is the right place to post my question. I am new to STM32F407.

I bought several different STM32F407VET6 boards (I already use several different STM32F103 boards).

The one I try to start with using with Arduino IDE is:

https://www.aliexpress.com/item/Core407 … 45575.html

My questions are:

which board should I select to build for ? STM32 Discovery F407, or STM32F4Stamp F405, other ?

which download method should I select ?

There is a STM32 BOOTLOADER available on the USB connection, if started with BT0 high, but I don’t see it as a port.
I also have a SEGGER J-Link, that can be connected to the board, and a ST-Link V2, that I use with STM32F103C8T6 mini boards.
But for both cases I do not know what Programmer to select.

I hope someone can help me get started with the new boards. Thank you very much.


Zingg_JM
Fri Feb 17, 2017 10:54 am
I still found no means to upload to this board.

STM32 Discovery F407 supports upload only through ST-Link (boards.txt),
but my ST-Link V2 does not talk to the board when connected to the corresponding pins of the JTAG connector, like I do on some F103C8T6 board.
ST-Link Utility fails to connect.

STM32F4Stamp F405 supports upload only through maple_dfu,
but the dfu-util does not find the device 0483:df11 of the boards USB connection (id verified with Device Manager).

And connecting through a CT2104 USB device to the 4 pin header (tx, rx, GND, 5V) that connects to PA9, PA10 also doesn’t work:

Searching for DFU device [10C4:EA60]…
dfu-util – (C) 2007-2008 by OpenMoko Inc.
Couldn’t find the DFU device: [10C4:EA60]

Maybe I need to learn how to manually upload the code through SEGGER J-Link to the board.

Is this already described somewhere? link?

And then I need to add a Generic STM32F407 to my boards.txt

In the meantime I leave this frustration behind and turn to my Arduino Due to try to connect my 5″ 16bit TFT.

Jean-Marc Zingg


RogerClark
Sat Feb 18, 2017 12:41 am
Some users seem to be able to upload via DFU, but I think it only works on Linux

I have Windows and can’t upload via DFU to the built in bootloader in the F4 series. I think this is because the DFU protocol that STM use is non standard, and you can’t use dfu-util, you have to use STM’s own DFU program, and it only accepts a special format of file

So on Windows, the only way to upload to F4xx boards is via STLink or via serial (or Blackmagic probe)

It would be good if the maple / stm32duino bootloader was ported from the F103 to the F4 but I don’t have time to do that at the moment, as I’ve got too many other things I need to do, e.g. update the site to PHPBB 3.2 as well as a whole heap of PR’s on Github which need to be tested and them approved or rejected


zmemw16
Sun Feb 19, 2017 12:28 am
@Zingg_JM
std q what platform, os, version, arduino core(s) version/date please, what target board, picture maybe?

can you confirm the segger works with another board i.e. ribbon cable connection ?
i’m debian jessie on i7, one of my seggers works with segger linux software, the other isn’t even seen on the usb
i also have a real st-link egg that doesn’t work either, the others do though, i think i got invisible blue smoke somehow :(
you might consider using a ‘generic’ cpu, that should give st-link as an option.

st-link same question
usb stick or a an egg type? the egg uses a 20w idc ribbon

please try swapping the swclk/swdio leads as well

the upload methods are ‘defined’ in the boards.txt config file??
i’d search the forum for adding a new board, istr something on the wiki as well.

with my usb serial boards, i use grey to PA10, RX with white to A9, blk to gnd
with i2c with nano/uno A4 with yellow & A5 green, STM b6 blue & b7 purp
with spi1 y, grn,blue, purp

stephen


Zingg_JM
Sun Feb 19, 2017 7:08 am
STM32 Discovery F407 supports upload only through ST-Link (boards.txt), and this works, if I connect ST-Link to the correct pins of the J_TAG connector. I had wired a cable for this, for a STM32F103C8T6 board, but with only a short 2×6 DuPont header, and misplaced it.
Sorry for the misinformation.
I will re-test USB to serial later, most likely I need to switch rx, tx; it is often unclear if the inking is for target or converter view.

So at least I have a working solution.

I work with Arduino 1.8 on Windows 10, the target system in question is the one the link is for.

Thank you for the support!

Jean-Marc


zmemw16
Sun Feb 19, 2017 5:45 pm
the board you link to is on the wiki along with its big brother using a zet6.
istr putting up links to a ‘manual’ of sorts, schematic and some sample software, although they’re for zet6 they should still be of some help.

i used chrome mainly for its translation, all i did was to browse the site.
also istr their search engine is a bit pedantic in the search string, case, type both upper/lower and stm32f407vet6/stm32f407zet6. :)

i’ve got a couple of both, still working on/with them. i’ve had both doing a blinky, but using libopencm3 and unicore-mx examples.
the directory structure for those is painful, but github does have repositories that ‘flatten’ it somewhat.

the peripherals still mapped the same e.g. i2c1 is still pb6 & pb7, spi1, spi2 etc, but hey that’s what symbols are for :D

stephen


palmerr
Tue Feb 28, 2017 12:38 am
I’ve also started to do some work on the F407VET6.

I’m adding information as I go to the “older” wiki http://wiki.stm32duino.com/index.php?title=STM32F407. If others also working on these boards would like to add to the information, it would save some duplicated work.

I have also edited the F407 platform.txt file as it was missing some quote marks in the USB part of the build section. They don’t cause an issue unless there are spaces in your build path. Since most Windows folks have “/Program Files (x86)/Arduino/” in their path…

I’ll generate a pull request shortly.

RIchard


RogerClark
Tue Feb 28, 2017 7:26 am
palmerr wrote:…..

I’ll generate a pull request shortly.

RIchard


ag123
Wed Mar 29, 2017 10:24 am
RogerClark wrote:Some users seem to be able to upload via DFU, but I think it only works on Linux

I have Windows and can’t upload via DFU to the built in bootloader in the F4 series. I think this is because the DFU protocol that STM use is non standard, and you can’t use dfu-util, you have to use STM’s own DFU program, and it only accepts a special format of file

So on Windows, the only way to upload to F4xx boards is via STLink or via serial (or Blackmagic probe)

It would be good if the maple / stm32duino bootloader was ported from the F103 to the F4 but I don’t have time to do that at the moment, as I’ve got too many other things I need to do, e.g. update the site to PHPBB 3.2 as well as a whole heap of PR’s on Github which need to be tested and them approved or rejected


palmerr
Wed Mar 29, 2017 12:11 pm
I’ve been making fair progress with the F407VET6 board – and been updating the wiki as I go. Starting to work on porting hardware drivers for I2C etc.

I need to remap some timers out of the way to accommodate the hardwired SDIO socket and Winbond SPI flash. Are any (other than systick) needed for core operation? I particularly need to move TIM8, which was remapped in the F405 Disco board that I’ve used as a template.


zmemw16
Wed Mar 29, 2017 1:49 pm
although a tad more, this is a ZGT board, product id on aliexpress 32761236140
same shop has this as the corresponding LCD product id on aliexpress 32746532235
this is first time i’ve seen a ‘corresponding display for a board’ in the blurb actually, so the more of us the merrier :D
to me that ‘corresponding display’ is worth paying the extra, now to get it displaying … …
stephen

palmerr
Thu Mar 30, 2017 6:57 am
Stephen, I’m keen to sort out the VET6 version before I get too excited about the ZET6! The pin maps, for instance are quite different as the FSMC could be in use on the ZET6 if the SRAM chip is installed, blocking out most of Ports D&E.

I have put working copies of the core doco and the board files up on github. Definitely works in progress!

https://github.com/palmerr23/STM32F407

I’m currently working on the hardware I2C library, so will put WireBase… HWire… I2C…files up when I have them working. I’m stuck with there being no signals on the SDA/SCL pins at the moment in hardware mode, while software I2C works just fine on the same pins (different code, of course!).

As the hardware I2C library works fine on my maple mini, I’m rechecking F4 pins and AF assignments. I have already sorted out the GPIO register differences and they read just fine after HWire.begin().


palmerr
Fri Mar 31, 2017 3:04 am
A quick look at Stephen’s “compatible TFT” on Ali Express, suggests that the pinouts aren’t at all compatible with these “Black” boards.

*** See post below. It is compatible***

“Black” board TFT Port (ZET6 version – note PortF & PortG pins)
Port Function Row Function Port
GND 1 LCD_RESET#
PD10 FSMC_D15 2 FSMC_D14 PD9
PD8 FSMC_D13 3 FSMC_D12 PE15
PE14 FSMC_D11 4 FSMC_D10 PE13
PE12 FSMC_D9 5 FSMC_D8 PE11
PE10 FSMC_D7 6 FSMC_D6 PE9
PE8 FSMC_D5 7 FSMC_D4 PE7
PD1 FSMC_D3 8 FSMC_D2 PD2
PD15 FSMC_D1 9 FSMC_D0 PD14
PD4 FSMC_NOE 10 FSMC_NWE PD5
PF12 FSMC_A6 11 FSMC_NE4 PG12
PB0 T_SCK 12 T_CS PC13
PF11 T_MOSI 13 T_MISO PB2
PB1 T_PEN (irq) 14 LCD_BL PB15
NC 15 GND
3V3 16 GND


zmemw16
Fri Mar 31, 2017 3:51 am
looking at wiki and f407v black, flash_cs as per schematic is tied to 3v3. that’s odd as the w25q16 ds says its /CS

re display pinouts, a) i’m just happy its got 34pins, not 32,36,40 etc, etc

i went through the f407zet ds and looked quite closely at the naming. might be i’ve got tired eyes, pretty sure the pinning was correctly named. it’s possibly not the best criteria, but the pcb is black :)
tomorrow, ok later on today after zzzz, i’ll check again … …
srp


zmemw16
Mon Apr 03, 2017 8:51 pm
looking at the pictures, rotate 180 and mirror left to right, as in fitting socket pin 1 to plug pin 1?

visually ( & physically) map/match the SCK pin, the rest match
also the translation of the pin names to schematic to the FSMC maps as i expected.

yes, my first thought was have i made a ‘maybe oops’, then i applied the first line :D

stephen


palmerr
Tue Apr 04, 2017 1:52 am
Stephen,

As you say, It’s just a jump to the left. And then a step to the right…. and we all get to do the time warp again!

Your spatial sense is better than mine, I didn’t do the obvious first time round.

Have you seen the new F4 core release? I’ve just downloaded it and will give it a try later.

RIchard


palmerr
Thu Apr 13, 2017 3:40 am
I think it is safe to say that the days of “STM32F4 boards – limited support” are drawing to a close.

Some new developments on the F4 front (thanks @ag123 for the topic references).

STM32GENERIC
@Danieleff has release a new “generic” STM32 core, which aims to minimise the effort to create variants for specific boards by making the core as flexible as possible (my paraphrase). First release 12 April 2017.
http://www.stm32duino.com/viewtopic.php?f=42&t=1966

ST’s core
Frederic Pillon (@fpiSTM) and several others have been working on delivering this core, and the F4 variant was first released on 1st April 2017.
http://www.stm32duino.com/viewtopic.php?f=48&t=1943

Arduino’s OTTO
The Arduino team have launched the OTTO – providing mainstream F4 support. (STM32F469, ESP8266 wifi, Additional SDRAM, SDIO, familiar MEGA footprint). http://www.arduino.org/products/boards/ … -star-otto

There are github repositories for all.

Several STM32duino contributors have been developing additional board variants for these cores. At least one STM F4 DISCO variant is available for both these cores.

My (in collaboration with @zmemw16) Black_STM407VET6 variant is available for the ST Core code https://github.com/stm32duino from https://github.com/palmerr23/Black-F407VET6-cube.

The board is inexpensive (~$15) and the full feature set is on the STM32duino Wiki http://wiki.stm32duino.com/index.php?title=STM32F407.

All of these excellent F4 cores are rapidly evolving, and adding features every week. They are already fit for purpose for a wide range of projects. Check the Issues pages on the githubs and the threads at the top of this post for which features are already enabled, and which are planned.

I hope this encourages more people to get on board the F4 train. The ride is pretty exciting at the moment for these powerful boards!


TerryTzeng
Fri Sep 08, 2017 3:12 am
Hi Roger,

Excuse me for developed question of nucleo stm32f411 board. I use arduino IDE to develop firmware on nucleo stm32f411, but found problem.

Environment :
1. Ubuntu 14.04
2. Ardino IDE 1.8.3
3. Board NUCLEO F411RE

Question List:
1. Why does use “lsusb” command to detect NUCLEO F411RE boad to display information is “Bus 001 Device 000: ID 0483:374b STMicroelectronics ST-LINK/V2.1 (Nucleo-F103RB)”? Is it right to show Nucleo-F103R, not F411RE.

2. I had git clone Arduino_Core_STM32 to /arduino/hardware folder and intall STM32F4 Board info on arduino board manage, but I couldn’t select board item of “Arduino STM32F4 (32 bit ARM Cortex M4)” when upload code to Nucleo-F411RE. (Board option have to show “”Arduino STM32F4 (32 bit ARM Cortex M4)”, but can’t select it. ) What’s happen for the issue?

The below list is my operating step:
* Setup Nucleo-F411RE to download mode.
* Usb cable to connect PC and Nucleo-F411RE
* Open arduino and select board option to upload.

Terry


RogerClark
Fri Sep 08, 2017 5:10 am
Terry

See the title of the thread…. “STM32F4 boards limited support” : My repo only has very limited support for F4 boards.

As you have a STM Nucleo board, you should use STM’s own official core, which supports that board.

See https://github.com/stm32duino/Arduino_Core_STM32


zmemw16
Fri Sep 08, 2017 8:36 pm
1. because the nucleo has a f103 programmed as a st-link (&more?) device.
2. off to check my setup, need to open the 411 plastic :)
Bus 003 Device 019: ID 0483:374b STMicroelectronics ST-LINK/V2.1 (Nucleo-F103RB)

mine selects ok, using nucleo-64 then it’s a sub-menu.

STM32GENERIC/STM32/boards.txt:NUCLEO_64.name=Nucleo-64 boards
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.name=Nucleo-64 boards
s[email protected]:~/sketchbook/hardware$ grep -R -i f411re */*/boards.*
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE=Nucleo-F411RE
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.upload.maximum_size=524288
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.upload.maximum_data_size=131072
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.series=STM32F4
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.variant=NUCLEO_F411RE
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.board=NUCLEO_F411RE
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.extra_flags=-DSTM32F411RE
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.massstorage_drive=NODE_F411RE
STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.f_cpu=100000000L
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE=Nucleo-F411RE
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.upload.maximum_size=524288
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.upload.maximum_data_size=131072
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.series=STM32F4
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.variant=NUCLEO_F411RE
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.board=NUCLEO_F411RE
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.extra_flags=-DSTM32F411RE
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.massstorage_drive=NODE_F411RE
vpv-STM32GENERIC/STM32/boards.txt:NUCLEO_64.menu.subboard.Nucleo_F411RE.build.f_cpu=100000000L


KevinA
Sun Feb 25, 2018 8:41 pm
This thread started on 4/29/2015
It is now 2/25/2018 and STM32F407ZET6 boards are abundant and below $15 USD with standard connectors for LCD/Wireless/JTAG. A board with SRAM, LCD, 1100 meter 2.4Ghz wireless is under $30 and plug & play.
I downloaded the Arduino code but Blink failed, of course.
How about a new sticky thread for the black STM32F407ZET6 boards that everyone is selling?
Thanks

stevestrong
Sun Feb 25, 2018 8:58 pm
You may find this useful: viewtopic.php?f=39&t=1976.
However, that is VE board, not ZE.

KevinA
Thu Mar 01, 2018 7:25 pm
[stevestrong – Sun Feb 25, 2018 8:58 pm] –
You may find this useful: viewtopic.php?f=39&t=1976.
However, that is VE board, not ZE.

After spending some time looking for all the items needed to develop I found https://goo.gl/QFvRhd
STM32F407VET6
STM32F407ZET6
STM32F407ZGT6
From $10 ~ $16 from ACELEX
and
with a different layout
STM32F407ZGT6 https://goo.gl/xcPFMV at $14 + shipping
Combined with the 3.2″ LCD with Touch Screen and 2.4Ghz wireless 1000 meter device, these make a nice development platform.


zmemw16
Fri Mar 02, 2018 7:35 am
last link has a pricing structure i’ve never seen before :D

makes me think of solving simultaneous equations :!:
srp


robca
Sat Mar 03, 2018 6:37 am
What would be the best core to start developing for a STM32F407VGT6 like https://www.ebay.com/itm/STM32F4Discove … 2366085094?

I have been using F103 boards only until now, and upon reading all I could find about F4 support, I must admit I’m awfully confused, apologies for asking what’s probably a FAQ

Would https://github.com/stevstrong/Arduino_STM32/ be the best starting point, using a Generic board like this “Generic STM32F407V series”?


stevestrong
Sat Mar 03, 2018 7:56 pm
For generic boards, yes, depending on what your plans are.
For discovery boards you may be eventually better served by the official or generic core.

robca
Sun Mar 04, 2018 12:45 am
[stevestrong – Sat Mar 03, 2018 7:56 pm] –
For generic boards, yes, depending on what your plans are.
For discovery boards you may be eventually better served by the official or generic core.

Fast answer from “the man” himself, what else can one ask for :) thanks!


stevestrong
Sun Mar 04, 2018 7:44 am
[KevinA – Sun Feb 25, 2018 8:41 pm] –
How about a new sticky thread for the black STM32F407ZET6 boards that everyone is selling?

You are free to do so.
But i will eventually not be able to contribute because i don’t own any zet6 board, i only have the generic and the mini vet6.


bipsen
Tue Nov 20, 2018 8:23 pm
[KevinA – Thu Mar 01, 2018 7:25 pm] –
STM32F407ZGT6 https://goo.gl/xcPFMV at $14 + shipping
Combined with the 3.2″ LCD with Touch Screen and 2.4Ghz wireless 1000 meter device, these make a nice development platform.

I was searching for info about ZGT6, and found this thread…. To me the STM32F407ZGT6 board at https://bit.ly/2QeOEKy seems nice, as it would be easy to plug into another board… But the main question is whether the ZGT6 is supported yet.


stevestrong
Tue Nov 20, 2018 9:12 pm
In principle the code should run on ZGT6, too, depending on your application.
Some pins have to be eventually re-mapped for LED and some peripherals.
But you are on your own with that, as I don’t have such a board.
However, creating a new variant is pretty straightforward, so it shouldn’t be very hard to do that.

bipsen
Wed Nov 21, 2018 5:44 am
I have looked at the files in the variants folder, but I am a bit unsure of the variant.h file. For example, the BLUE_F407VE_Mini lists

// This must be a literal
#define NUM_DIGITAL_PINS 94
// This must be a literal with a value less than or equal to MAX_ANALOG_INPUTS
#define NUM_ANALOG_INPUTS 14


fpiSTM
Wed Nov 21, 2018 7:22 am
This is not an issue.
For the NUM_DIGITAL_PINS, this is because some pins have been duplicated for arduino compatibility.
For the ADC, this is due to the fact 2 pins are not proposed as ADC. That’s all.

bipsen
Wed Nov 21, 2018 10:07 am
Okay – so NUM_DIGITAL_PINS can probably be considered number of defined pins + NUM_ANALOG_PINS (for VET6 mini, that would be 80+14 = 94) ?
And NUM_ANALOG_FIRST would be the num following the last definition in the array “extern const PinName digitalPin[];” ..

stevestrong
Wed Nov 21, 2018 10:37 am
Don’t bother with those definitions, Roger’s (and my) core does not use them, I think, although some libraries may use the analog pins.
Also see: https://github.com/rogerclarkmelbourne/ … issues/335

Oh, btw, if you don’t need so many pins and so much flash, this is a cheaper alternative: https://www.aliexpress.com/item/STM32F4 … 85751.html


kbahey
Thu Jan 03, 2019 4:35 am
[palmerr – Thu Mar 30, 2017 6:57 am] –
https://github.com/palmerr23/STM32F407

I’m currently working on the hardware I2C library, so will put WireBase… HWire… I2C…files up when I have them working. I’m stuck with there being no signals on the SDA/SCL pins at the moment in hardware mode, while software I2C works just fine on the same pins (different code, of course!).

As the hardware I2C library works fine on my maple mini, I’m rechecking F4 pins and AF assignments. I have already sorted out the GPIO register differences and they read just fine after HWire.begin().

Hello,

Does I2C work on the Black STM32F407VET6 generic board yet?

If your repo’s I2C indeed works, how does one install it in (or alongside) Arduino_STM32? Copy it to arduino/libraries, or arduino/hardware/?

Thanks in advance.


stm32_discoverer
Wed Jan 23, 2019 6:47 pm
Hi guys, please tell me why it gives an error compiling a sketch – Board f407VGT6 black
void loop() {

GPIOB->regs->BRR = 0x0008;
GPIOA->regs->ODR=(i);
GPIOB->regs->BSRR = 0x0008;
}


stevestrong
Wed Jan 23, 2019 8:05 pm
Which core? Which IDE?
regs is defined in gpio.h. but there is no brr register, i think.

Rick Kimball
Wed Jan 23, 2019 8:05 pm
Where did you download your stm32f4 board support from?

stm32_discoverer
Wed Jan 23, 2019 9:02 pm
I tried Arduino IDE version 1.8.1 and version 1.8.6
I’m using Roger Clark’s core Arduino_STM32

stm32_discoverer
Wed Jan 23, 2019 9:08 pm
I am interested in the possibility of using gpio functions and port manipulations as in F103 processors, for example :
GPIOB ->regs – >BRR
GPIOA->regs->ODR

stevestrong
Wed Jan 23, 2019 9:08 pm
Check here the available registers: https://github.com/rogerclarkmelbourne/ … gpio_def.h

stm32_discoverer
Wed Jan 23, 2019 9:21 pm
do I understand correctly that
GPIOB->regs->BRR – working fine on F103R applies to
PIN_MAP[pin].gpio_device)->regs->BSRRL = BIT(pin&0x0F)?

stevestrong
Thu Jan 24, 2019 9:18 am
I really don’t know about Roger’s F4 repo.
But my F4 repo is a bit further developed, you could give it a try if you want to stick to Libmaple core.
See https://stm32duino.com/viewtopic.php?f=39&t=1976

The GPIO regs definitions in my repo are slightly different, see: https://github.com/stevstrong/Arduino_S … _def.h#L56
Also, the pin map as you know it from Roger’s repo doesn’t exist anymore.


flyboy74
Thu Jan 24, 2019 11:25 am
If you get stuck then no matter what core you use if you include the header from ST “stm32f4xx.h” then you can use their definitions to access every register on the MCU

stevestrong
Thu Jan 24, 2019 12:17 pm
If you mean, this header file
https://github.com/stm32duino/Arduino_C … tm32f4xx.h
then you will most probably need at least one more header file, and you have to know the struct type definition.
Furthermore you have to know how the core types should be handled, meaning you actually have to use that core.
Same is valid for libample core.

stm32_discoverer
Thu Jan 24, 2019 9:21 pm
Thanks Steve, your link was very helpful, it was much easier than I thought
void loop() {
// put your main code here, to run repeatedly:
//GPIOA->regs->ODR=(j);
GPIOC->regs->BSRRL = 0x2000;
delay(1000);
GPIOC->regs->BSRRH = 0x2000;
delay(1000);
}

flyboy74
Thu Jan 24, 2019 9:57 pm
[stevestrong – Thu Jan 24, 2019 12:17 pm] –
If you mean, this header file
https://github.com/stm32duino/Arduino_C … tm32f4xx.h
then you will most probably need at least one more header file, and you have to know the struct type definition.
Furthermore you have to know how the core types should be handled, meaning you actually have to use that core.
Same is valid for libample core.

OK yes you will need another header file after taking a closer look it seems when I include “stm32f4xx.h” it in fact then just includes “stm32f407xx.h” so all the definitions are in the “stm32f407xx.h” file to write to all the registers on that MCU

Why will you need to know how core types should be handled?? As using the definitions in “stm32f407xx.h” will set a pointer directly to the register and write directly to it regardless what the higher level core is doing.


stm32_discoverer
Fri Jan 25, 2019 8:03 am
Hi everyone again, my question again about f407VGT6 black board, Arduino IDE 1.8.6,Roger’s core, why when you compile the sketch
byte static flash[2]={156,156};
void setup() {
}

void loop() {
}


stevestrong
Fri Jan 25, 2019 8:15 am
That is only a warning about a not used variable.
You posted sketch obviously does not entirely match the real code what you tested.

stm32_discoverer
Fri Jan 25, 2019 8:48 am
Yes, I’m trying to port my project from f103ret6 processor to f407VGT6, so I’m testing parts of the code to compile in Arduino IDE without errors. Steve, can I not pay attention to the warning, the variables will be read from the flash memory?

stevestrong
Fri Jan 25, 2019 9:27 am
A warning is just a warning, and can be of course neglected, depending on its meaning.
But you have to know what you are doing, and if you have later problems, a warning can be then relevant.

Please start a new thread about your project if you have more questions, because this here is not adequate to solve each of your small issues.


stm32_discoverer
Fri Jan 25, 2019 9:49 am
Ок, thank’s Steve for your help, I will continue to port, if there are questions then of course I will open the topic of my project.

Leave a Reply

Your email address will not be published. Required fields are marked *