Sticky: STM32F4 boards - limited support

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
ag123
Posts: 770
Joined: Thu Jul 21, 2016 4:24 pm

Re: Sticky: STM32F4 boards - limited support

Post by 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
for F4, i think there are some advantages/disadvantages between using the on-board DFU loader/flash support vs building a separate 'boot loader'.
For one thing, using the onboard DFU flash update functionality avoids an overhead of consuming some ram (and to a smaller impact flash) as in the case of a bootloader. However, i noted that some 'sketches' probably 'just works' simply because the boot loader did quite a bit of initialization, setting up clocks, peripherals etc. while when i fall back to just the raw stm32 app, if i forget to setup clocks HSE etc, the sketch may simply not work.

the other benefit is that DFUSe with the onchip support is the equivalent of flashing raw images via uart, st-link etc. u could literally flash the 'boot loader' just the same way using DFUSe by simply connecting the usb cable, set BOOT0, and dfu-util -s 0x8000000 -D myapp.bin

the somewhat different protocol by ST i.e. DfuSe is discussed in this link
http://dfu-util.sourceforge.net/dfuse.html

if i happen to have time experimenting with that (no promises whatsoever) i may take a look at that 'driver stack' on windows.
note that i'm not using arduino ide doing 'sketches' on F4, rather i'm using gnu arm eclipse(http://gnuarmeclipse.github.io/) which is a native development environment based on ST set of libraries and headers.

i'm somewhat dragging my feet in terms of setting up arduino ide as i find the bulk rather huge as arduino ide caters for a more diverse set of mcus rather than just stm32, but i'd likely set it up some day, there'd be a 'learning curve' as well with the different ide stacks

palmerr
Posts: 58
Joined: Tue Jan 31, 2017 6:21 am
Location: Melbourne, Australia

Re: Sticky: STM32F4 boards - limited support

Post by 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
Posts: 1449
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Sticky: STM32F4 boards - limited support

Post by 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
Posts: 58
Joined: Tue Jan 31, 2017 6:21 am
Location: Melbourne, Australia

Re: Sticky: STM32F4 boards - limited support

Post by 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
Posts: 58
Joined: Tue Jan 31, 2017 6:21 am
Location: Melbourne, Australia

Re: Sticky: STM32F4 boards - limited support

Post by 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)

Code: Select all

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	
Ali Express TFT pins
Image
Last edited by palmerr on Mon Apr 10, 2017 3:18 am, edited 1 time in total.

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

Re: Sticky: STM32F4 boards - limited support

Post by 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
Posts: 1449
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Sticky: STM32F4 boards - limited support

Post by 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
Posts: 58
Joined: Tue Jan 31, 2017 6:21 am
Location: Melbourne, Australia

Re: Sticky: STM32F4 boards - limited support

Post by 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
Posts: 58
Joined: Tue Jan 31, 2017 6:21 am
Location: Melbourne, Australia

Re: Sticky: STM32F4 boards - limited support

Post by 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
Posts: 1
Joined: Fri Sep 08, 2017 2:17 am

Re: Sticky: STM32F4 boards - limited support

Post by 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

Post Reply