I use PIC18F6622 and PICC compiler.

I use the Watch Dog Timer to regularly wake from sleep mode. The data sheet states that watch dog fire during power-managed modes exits the mode and usually it works just fine.

However, sometimes I see an unexpected reset. Using PICC's reset_cause() I found that the reason is WDT_FROM_SLEEP. What does that mean? Why is it causing a reset instead of wake-up??

Thanks a lot,

Lkanab.

有帮助吗?

解决方案

An interrupt event may have woken the PIC up, then the WDT probably overflowed during run mode, which would cause a watchdog reset.

其他提示

You are entering your MCPU into SLEEP mode. In this mode the MCPU wait on event to wake-up form sleep. You didn't explain what kind of events/interrupts are enabled before your program go into SLEEP mode. Let say if you are waiting on OnPinChange (EEPROM write, ADC conversion ...) event and that is never heppend (or to late) so the Watch Dog time expire and reset the MCPU.

One solution: try to increase the Watch Dog Timer time interval.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top