Of course the reason you don't want this, is that over 100s or 1000s of cycles, you accumulate quite a large delay - severity depending on the clock cycle. 10ms wakeup cycles giving me roughly 1.8% or 18000ppm drift.
On the MCU, you'd use vTaskDelayUntil instead of vTaskDelay to solve this.. I guess the ULP just can't be this simple.
Essentially my questions are:
- are my observations correct?
- is there something I can do about this?
For example, is there a way to read the RTC_TIME registers at the very beginning, then reading them at the very end of the program, and using the difference to alter the ULPs sleep timer? - and also accounting for the fixed number of cycles we spend doing this of course.
According to the documentation, and technical reference, you can only
So I'm a bit sceptical about the feasibility of this - this is why I came here to ask, instead of spending hours digging through the documentation, dumping and writing to registers, etc.select one of theSENS_ULP_CP_SLEEP_CYCn_REG registers that contain the expiration period