Watchdog and Wake Up from Deep Sleep LPC11Uxx

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

Watchdog and Wake Up from Deep Sleep LPC11Uxx

1,340 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SimonWakley on Fri Aug 07 20:57:36 MST 2015
Hi,

I have seen quite a few posts about waking up the LPC11xx and many of the use a STARTRSRP0CLR address, but that is not present on the LPC11U apparently. I have been trying to get the watchdog to wake up my device, but I can't seem to get it to work as expected.  It will run and generate the interrupt, but it is not causing my main loop to progress past the __WFI().  I have tried setting the SLEEPONEXIT bit both ways to no avail.

Does anyone have working code for the LPC11Uxx to wake itself up (actually it is an LPC11U24) either using the watchdog or using an internal counter timer. DEEPSLEEP is my first power down level target.

Does anyone have an idea that __WFI() doesn't wake up on the watchdog interrupt.  Strangely if I run BOTH the systick timer and the watchdog warning interrupt, then the WFI wakes up more frequently than either of the interrupts, so the watchdog DOES seem to cause it to WFI when the systick is ALSO running, but not when it isn't. Confusing.

I can put into into DEEPSLEEP and after a few times almost bricking it, I have got it to wake up from DEEPSLEEP, but it apparently also resets the chip which DOESN'T happen if I just use the watchdog in SLEEP mode. I have set that bit (WDRESET) correctly too I believe but it seems to behave differently waking from a SLEEP and a DEEPSLEEP.

I am using the WARNINT interrupt, so I guess it goes off shortly before the Watchdog goes off. Maybe there is a timing issue with that and the chip doesn't wake up fast enough to feed the Watchdog before it really triggers.??

Thanks.
Labels (1)
0 Kudos
Reply
2 Replies

998 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SimonWakley on Tue Aug 11 10:48:42 MST 2015

Wake Up Reset Issue Update:

I was getting a reboot on RTC powered wake up (And Watchdog) , and I put some code in the start and realized the BOD was resetting the chip. I disabled the BOD reset, and it is working as expected.  I am going to investigate the PSU to see if the Wake Up surge was upsetting it.

Also it is a good idea to put a 5 second delay in the start up before you set the sleep mode so that if you brick it, you can reset and then re-flash Smile

Significant power saving appears to be occurring !!


0 Kudos
Reply

998 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by SimonWakley on Mon Aug 10 20:29:06 MST 2015
Further to the above.

I sorted out the WFI issue.  And of course, I can't wake up from DEEPSLEEP from an internal counter since the internal counter doesn't run in DEEP SLEEP :-)  However I did get the counter timer to work and wake me up from Sleep; for some reason Match0 did NOT work, but the other Matches did.

I now have a system that I can put into DEEPSLEEP, and I can wake up with an a signal from an external RTC or from the Watchdog timer which I have set up, but whenever I wake it up, the processor immediately resets.

If I don't put it into DEEPSLEEP then the watchdog runs totally happily without resetting and the external interrupt happily wakes the processor from SLEEP and everything works as expected.  As soon as I try to save more power, the whole thing resets on either of the wake up type interrupts.

Does anyone have data on waking up the LPC11Ux from DEEPSLEEP without resetting.

Thanks,

Simon

0 Kudos
Reply