tickless wake from low power mode with 32 bit / 32768 Hz resolution
I'm new to the STM32L053R8, and I'm trying to emulate a configuration I've used on other ARM M0+ systems.
Ideally, I want to maintain a 32 bit counter (physical or virtual) clocked at 32KHz so I have ~30 uSec resolution with a ~131K second roll-over interval. Then I want to put the processor into *some* low power mode (I'm not picky, but the lower the better) and have it wake up when the counter matches an arbitrary 32 bit value that was set prior to sleeping.
It's possible I could torture the RTC into doing this, but it seems unlikely. Ganging together TIM21 and TIM22 seems more likely, but is there a way to get them to wake the processor without resorting using GPIO pins and external components?
(Side note: if this really isn't practical on the STM32L053Rx, I'll probably settle for a 16 bit counter clocked at 1KHz, so I have 1 mSec resolution with 65 second roll-over and synthesize longer timeouts in software.)