I am trying to debug my code on STM32 MCU board made by me. I am using SWD
On attaching MCU, when I click 'Flash->Erase', I am able to erase successfully. When I click 'Flash->Download', program gets downloaded. It don't show any error like communication fail. So I consider this step as successful.
But when I click 'Start debug session', debug runs & don't stop & also I don't find where the control. The red cross button highlights to stop the debugger. When on clicking it control gets lost, & program just gets stop.
What could be problem.
I had connected 0.1uF to reset pin which was creating problem, removing it had solved the problem.
But now I have some other problem:
When I connect debugger & start debugging the code wroks fine & running. But when I try to run my code without debugger i.e directly with power to check how it work in real situation.
Code does not run. But when I connect debugger only it runs as debugger pulls reset pin which causes MCU to come out of reset state. How to correct that issue
I read in STM32 datasheet that 0.1uF should be connected to reset pin.
Might there be a reason why people like to use dedicated reset monitor chips to guarantee that the processor always gets a good reset?
No, it never solved any problem. It only changed your hardware from having one kind of problem to having another, even bigger one.
How to correct that issue Make sure your hardware creates a decent reset signal. Yours clearly doesn't, neither with the 0.1 uF connected, nor without it.