You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/13 13:21:35 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #2625: Add time ticket related APIs to support hot sleep function

xiaoxiang781216 edited a comment on pull request #2625:
URL: https://github.com/apache/incubator-nuttx/pull/2625#issuecomment-759443692


   > > > @xiaoxiang781216 could you take a look here please.
   > > 
   > > 
   > > Sorry, I thought this PR is for esp32 specific. So this patch want to sync the system time after wake up from RTC timer?
   > 
   > Hi @xiaoxiang781216 Yes, after entering auto-sleep(pm standby mode), the system clock interruption will stop, when exiting auto-sleep, the idletime tick obtained through watchdog monitoring (by calling wd_getidletime) will be inaccurate, so after exiting auto-sleep, the obtained system tick needs to be compensated (by calling wd_setsleepticks).
   
   But, the compensation isn't completed there are other places depend on the correct timing. At least:
   1. systime need to update
   2. sched::timeslice need to update
   2. Many field in sporadic_s need to update
   
   To sync the timing information, the better method is:
   1. Call nxsched_process_timer with enough times after wakeup for fixed tick mode
   2. up_timer_gettime return the compensated time for tickless mode
   
   The above method can ensure all timing related component get updated correctly.
   One improvement, we can change nxsched_process_timer prototype to accept the elasped ticks:
   void nxsched_process_timer(uint32_t ticks);


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org