2015-05-28 09:53 AM
Hi,
I just got my new STM32F4 discovery board, i wrote a LED test program with CoIDE and flashed it, but LED didn't toggle, even i try to press RESET button. Then i go to debug mode and click run, it starts to toggle. I plug out the power and plug in again, it doesn't toggle, after i open the STLINK Utility and click connect, it starts to run. Could anyone tell me what is the problem? Is it something to do with Bootloader? Thanks.2015-05-28 10:00 AM
Is it something to do with Bootloader?
Unless you've strapped BOOT0 High, then no.Look more carefully at your code, specifically that you enable all the clocks you are using. The debugger enables things it needs to function, the side effect is that things you're using may also start working despite your code being incomplete/wrong.Short of that you'll need to waypoint your code with GPIO, LED or USART output so you can understand where it got to or stopped.2015-05-28 11:32 AM
You are right, was a pin configuration error. Now it is working:) Thank you very much.
2015-05-28 11:54 AM
Do you have any semihosting libs/code in your project ?
Try removing it, and rebuild. Check your startup code. Not sure what Coocox provides, some toolchains (like Crossworks) add a ''catch loop'' at the very beginning, to prevent bad code from locking out the debugger. EDIT: realized it's already solved ...2015-05-28 12:13 PM
Assuming this is an STM32F429I-DISCO not an STM32F4-DISCO
There's some C++ and CooCox style I don't care much for, but it looks reasonable enough. Try the attached .HEX ________________ Attachments : STM32F429I-DISCO-LEDS.hex : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Lq&d=%2Fa%2F0X0000000blh%2F0K7dOYknvQPEUd5BSLG2REOLU20s.wy98WUQw3Dqlc4&asPdf=false