Skip to main content
klas lofstedt
Associate
June 29, 2018
Question

stm32f407vgt6

  • June 29, 2018
  • 6 replies
  • 3156 views
Posted on June 29, 2018 at 13:00

Hi, I bought a chinese dev-board, more specifically this one:

amazon: 

https://www.amazon.com/Diymore-STM32F407VGT6-Cortex-M4-Discovery-Development/dp/B01M7YB5HF

 

schematics: 

http://dubstylee.net/v/wp-content/uploads/2017/08/DIY-More-STM32F407VGT6.png

 

I can successfully flash a simple LED code to the chinese board using the SWD pins on a discovery board and stm32 ST-link utility. However the program never starts. The project is generated with standard settings for the processor in CubeMX, and it runs without problem on the discovery board, but nothing on the chinese dev-board.

Anyone got an idea about if i need to pull some pins low/high for the program to start or anything of the like? Any help is appreciated.

#clone #standalone #diymore #stm32f4
This topic has been closed for replies.

6 replies

Bogdan Golab
Lead
June 29, 2018
Posted on June 29, 2018 at 13:28

You can check if the boot0 jumper is closed (boot0 pin grounded).

waclawek.jan
Super User
June 29, 2018
Posted on June 29, 2018 at 13:34

This

https://github.com/dwelch67/black_pill_too

  appears to talk about the same board.

JW

henry.dick
Associate II
June 29, 2018
Posted on June 29, 2018 at 13:42

try to step through your code and see what happens.

Tesla DeLorean
Guru
June 29, 2018
Posted on June 29, 2018 at 14:25

Obvious places to look would be HSE_VALUE setting for clock, Error_Handler or HardFault_Handler, or other places where it might get stuck up in a while(1) loop, or waiting for a clock or PLL to spin up.

BOOT0 Low JP4 ON will make sure it runs from FLASH rather than ROM loader

Step the code, if it doesn't get to main() uncheck 'run to main()'. Trying to determine how far you're getting, what addresses it reports, if stopped, where, etc.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
klas lofstedt
Associate
June 30, 2018
Posted on June 30, 2018 at 08:35

Thanks guys! I successfully flashed and run the code from linux using the on-board bootloader as suggested by the link sent by waclawek.jan. I'm not sure if it will solve the SWD probs, but using the bootloader is easier anyway.

waclawek.jan
Super User
June 30, 2018
Posted on June 30, 2018 at 09:56

Just one quick question, maybe dumb, but one never knows:

I can successfully flash a simple LED code to the chinese board using the SWD pins on a discovery board and stm32 ST-link utility.

You did disconnect the discovery target mcu from the discovery STLink, did you?

JW

klas lofstedt
Associate
June 30, 2018
Posted on June 30, 2018 at 10:03

Yes i did, but i'm unsure however i set BOOT0 to gnd or not before reset. Chances are that will solve my initial problem, but using usb rather than swd is more convenient anyway.

klas lofstedt
Associate
July 2, 2018
Posted on July 02, 2018 at 07:58

Today i tried the SWD pins from the discovery board which was my initial problem, and it worked well. If it can help somebody this is what i had to do, and this should work on any baremetal stm32 design not only the dev board i bought.

Apart from connecting the SWD pins (VCC, GND, SWDIO, SWCLK) i had to connect another VCC, and BOOT0 to GND. Then i could flash and debug just as usual. Thanks again for the help folks.