2018-06-29 04:00 AM
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 #stm32f42018-06-29 04:28 AM
You can check if the boot0 jumper is closed (boot0 pin grounded).
2018-06-29 04:34 AM
This
https://github.com/dwelch67/black_pill_too
appears to talk about the same board.JW
2018-06-29 04:42 AM
try to step through your code and see what happens.
2018-06-29 05:25 AM
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.
2018-06-29 11:35 PM
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.
2018-06-30 02:56 AM
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
2018-06-30 03:03 AM
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.
2018-06-30 03:05 AM
It may be convenient for programming, but you might want to use the on chip debug one day... :)
JW
2018-06-30 03:08 AM
Very true! But until then i do the development on a discovery board with the same processor.