Hi,
When i enable Independant Watchdog via IWDG_Enable(),
if there is watchdog reset because of watchdog timer reaching 0,
reset occurs fine.
but if for some reasons, i fall in _unhandled_exception, the mcu remains stuck in
ResetHandler () at ../../ChibiOS/os/ports/GCC/ARMCMx/crt0.c:267
NRST pin has no more action, and only way to restart mcu is to unplug/plug it.
that does not occurs if IWDG is not activated, in this case, when in _unhandled_exception
if i use NRST pin, ResetHandler is called and it call main and mcu restart without the need
to unplug/plug it.
Is there a way to use Independant Watchdog without this behaviour ?
Alexandre
stuck in ResetHandler when activating Independant Watchdog
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: stuck in ResetHandler when activating Independant Watchd
It is the normal behavior, if the CPU goes in unhandled exceptions the watchdog triggers a reset after a while, the system restarts and then it goes in exception again and again.
You must remove the cause of the exception. If the exception is "normal" for you then you may redefine _unhandled_exception in your code (it is a weak symbol) and reset the WDG inside there.
Giovanni
You must remove the cause of the exception. If the exception is "normal" for you then you may redefine _unhandled_exception in your code (it is a weak symbol) and reset the WDG inside there.
Giovanni
Re: stuck in ResetHandler when activating Independant Watchd
Solved
It was entirely my fault, there was fault condition in the branch of the code executed only when
recovering from watchdog reset.
sorry for disturbing.
Alexandre
It was entirely my fault, there was fault condition in the branch of the code executed only when
recovering from watchdog reset.
sorry for disturbing.
Alexandre