cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I need to debug my project every time to make it stm32 work?

YBAYR.1
Associate III

Why do I need to debug my project every time to make it stm32 work?

What is the reason why the system does not work when I turn it off after disconnecting it from the computer?

For the system to work, I need to connect it to the computer, then when I debug, it works without any problems.

8 REPLIES 8

You've built a board that floats BOOT0 pin?

You've coded something with a dependency, perhaps speed, and clock, or reliant on something the debugger sets or configures, and you don't?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
 

I am using nucleo board (302re) my codes are like this

Unless it is held in reset, the MCU likely runs.

If powered from a charger cable the ST-LINK/V2-1 might hold the device in reset, depending on the version of firmware. Remove related jumpers or solder-bridges for NRST pin.

Add instrumentation, especially the Error_Handler(), and HardFault_Handler() so you can determine if it gets stuck there.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

​ok i will try. Can I reach you on LinkedIn!

S.Ma
Principal

Issues sometime come from the floating pins for the STLink VCP RX/TX, or -if used- the MCO clock gen of STLink to target chip under debug.

YBAYR.1
Associate III

Yes. It could be because of that point. I'm trying to fix. Do you have any suggestions on how to debug the project to make it a product?

Thank you very much for your comments.How to arrange for a commercial product. how to get debug? @S.Ma​ @Community member​