2015-04-19 02:45 PM
Hello,
I'm using IAR and I configured stm32f429 discovery board by STCubeMX and its libraies. It seems to work fine when I run my code with Download and Debug mode. But when I exit debug mode the board stop running immediely even if I downloaded my code into flash memory. I have no idea what I shoud fix in order to make the board run without debug mode. Please help if anyone know about this issue. Best regards, #stm32f429 #st32f42015-04-19 04:45 PM
For code that only runs in debug mode you'd want to double check for clocks being enabled, and code that's time sensitive.
To troubleshoot you may want to try other methods of indicating progress through your code, ie GPIO or USART output.2015-04-19 06:46 PM
Always thank you for your help.
Do you mean set USART and see if communication success in debug mode?If not, can I assume my RCC clock setup is wrong?Actually, I used STcubeMX to configure the board initially and then I manually added stm32f429 discovery library for LCD and gyro. Do you think it could be problem? Best regards,P.S: I put two LED blinking code. LEDs are also blinking only at debug mode.2015-04-20 05:45 AM
I wouldn't assume anything, you need to analyze what's happening and why.
I've suggested a couple of things that might be issues, but I have no insight into your code/system. With systems that are difficult to debug I tend to use a USART to output information, this requires that it is set up early, and might be done without library code. A slightly simpler alternative is to use GPIO pin(s). I would also suggest walking through the code from the ResetHandler to some other checkpoint in the code, and confirm there are no infinite loops, and that clocks are enabled before use. I'd also have the Hard Fault Handler signal in some fashion so I could see if any gross errors ended up there.2015-04-21 06:14 AM
Don't forget to remove the semihosting lib in your release build.
2015-04-24 06:08 PM
Thanks everyone for help.
Finally, I found the problem. I used printf for degugging. this printf stops my system when I leaev debug mode. I don't know a specific reason yet. But, I removed the printf and it fixed my problem. Thanks again.