Low Power Ticker Porting

We are trying to support a 32bit sleep time, by cascading two 16 bit timers together. This works quite well. However, in doing so, there is a situation that can result in our implementation of the ticker_set_interrupt function taking more than the 20us specified by the Porting Guide for the Low Power Ticker (https://os.mbed.com/docs/mbed-os/v5.13/porting/low-power-ticker.html).

If the current value on the lower order counter is equal to its desired match value when ticker_set_interrupt is called we may take ~35us to complete. The other times it would be well under the 20us requirement. On average we would expect to take 5-10us , however, roughly once every 65536 times it would take ~35us. Is this acceptable?

Ryan, if you can get a sleep / deepsleep working like it used to a few years ago when Erik Olieman’s WakeUp library worked with Mbed:

and… not keep depreciating it, messing about with it, adding RTOS or any other junk completely useless code that nobody really wants, simply just make it work, then I will use it and very very happy indeed!!!

Good luck, if you succeed you will be the first since Erik’s in 2013.