I am working with the LPC812. The microcontroller will be in Power Down mode and it needs to wake up every 5 minutes or on pin interrupt. The problem I have right now is that with the code I have, when there is a pin interrupt, it will also reset the 5 minutes timer.
I tried reading the LPC_WKT->COUNT register when waking up with the Pin interrupt, so I could restart the WKT timer with this value when going back in Power Down mode, but I always read 0.
How can I do that?
Thank you!
Hi Martin Pare,
The pin interrupt should not influence the WKT timer.
When you read the COUNT register, please check this remark in the user manual:
Please read the register twice in succession.
Please try again.
If you still have question, please let me know!~
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------