I have been facing a reset issue.
My controller resets randomly. I have Codded for the source of reset at the begin of the routine.
For the testing the code I made the system reset on purpose and was able to find flags set for BOR, Software reset, Internal watchdog timer, external PIN reset. so the logic works.
The issue i'am facing rite now is that the system gets resets randomly in about an hour or so(generic time..no specific pattern observed) and the only flag that is set is External PIN flag.
Now according to STM32 manuals it says External PIN flag will always be set if other source of reset is there and the block diagram shown clarifies it, and have observed to in my testing, every reset source is accompanied by External PIN flag set. and only External PIN flag is set when i purpose fully press the reset switch.
1) I want to ask the scenarios under which the External pin Flag can alone be set. 2) Which flag will be set in case the code crashes and the system restarts Automatically. (read on internet that system can crash because of stack,memory leaks, etc.. and cause reset.)
Any insight on the matter would be of great help.