[S08][PT] Unknown reset reason

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[S08][PT] Unknown reset reason

665 Views
francescoprospe
Contributor II

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?

Labels (1)
Tags (2)
0 Kudos
3 Replies

501 Views
iansmusical
Contributor V

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

0 Kudos

501 Views
francescoprospe
Contributor II

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:

0 Kudos

501 Views
iansmusical
Contributor V

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

0 Kudos