Hi to all,
I am writing an application on a S08PT.
The appliction features, between other things, the watchdog (WDOG) with a timeout set to 60 seconds
and clears it continuously in the main loop.
During run-time, at some point, the mcu resets. The SYS_RSR is 0x20 (bit5 = 1 -> WDOG bit).
Thing is, it happens to reset before 60 seconds from the power-on.
If I take out the WDOG, the application does not reset.
Has anyone an advice on this situation?
Ciao Francesco,
I know it's stating the obvious but are you sure you set up a 60 second timeout with all appropriate registers initialised? Is it anything to do with the accuracy of the clock you specified? Finally is there a chance that some code does happen to take longer than the timeout to execute?
Thanks,
Ian
Hi Ian and thanks for the reply,
in order:
The 60 seconds timeout is set by the PE initialization code. I tested it blocking the main loop. After 60 seconds, the mcu resets.
I didn't perform any benchmark on the main loop execution time (and I'll do it) but surely it is not longer than 60 seconds.
And don't worry about the obvious. ANY other hint is welcome. :smileyhappy:
Ciao Francesco,
Again I'm clutching at straws but you mentioned that with no watchdog writes that after 60 seconds the mcu resets as expected. However, in your first post you mentioned that with the watchdog writes the mcu was resetting before 60 seconds. That seems a bit strange!? Are you using window mode as that seems to have some constraints associated with it?
Thanks,
Ian