I'm would like to use an LPC54114 to sample several serial sensors at 32Hz. For power savings, I'd like to put the LPC into deep sleep in between each sample, to get current draw down to <200uA. The LPC is in charge of the sample timing, so I cannot just wait for a data ready signal from one of the peripheral sensors. I'm using the built-in RTC with a 32.768kHz crystal. The issue I'm having is that I cannot figure out a way to generate a 32.0Hz (31.25ms) wakeup from deep sleep, as it seems there are only a limited number of peripherals that can stay on in deep sleep (see attached Table 194 from the user's guide). I guess my question is: am I missing something? It does not seem like this should be a very difficult task to accomplish but none of the options I can think of seem very straightforward.
Options I've considered but do not seem like they will work
- RTC -- The 1kHz wakeup could be used, but it can only generate wakeups at 1ms intervals. For legacy reasons, I would prefer to keep the sample rate at exactly 32Hz.
- Micro-Tick Timer -- This timer technically could do what I need, but because it can only be clocked from the Watchdog Oscillator it can drift by +/-40% which is too much, even if I synchronized it at the beginning of every RTC second.
Options that might work but I'm not sure if they are possible
- Leave FRO on in deep sleep -- Apparently this is possible (see attached Table 193). However I don't fully understand what the functionality of this would be. If the FRO is on (at the cost of 100uA) does that mean I could use a peripheral that is clocked by it, such as one of the CTimers, the MultiRate Timer or the SysTick timer? My understanding was that in deep sleep all these were forced off.
- CLKOUT Pin wired to a pin interrupt -- I have not tested this, but it seems possible (see attached Fig 8 -- clock distribution diagram from the user's guide) that I could configure the CLKOUT source to be the RTC clock, select a divider of 256 (for output freq of 128.0 Hz) and output this signal onto P0.21. I could attach this to another pin configured as a pin interrupt and then sample every fourth time it fires.
- Achieve <200uA current draw without deep sleep -- By reducing the clock rate could I achieve the power level I want while using sleep mode? The issue then seems to be that if I were to switch the MAIN_CLK to, say, the 32K_CLK I would not have a consistent clock source to time the sample intervals with.