PetteriAimonen opened a new pull request, #10827:
URL: https://github.com/apache/nuttx/pull/10827

   ## Summary
   
   Prior pull request #9084 and issue #8858 added basic adjtime() support for 
the SAMv7 platform.
   
   This pull request adds support for STM32 platform.
   
   In addition I have made a few changes to the adjtime() configuration options:
   
       1) Previously adjustments less than 1 microsecond per tick would be
          completely ignored. Now they are applied over a shorter period at
          a rate of 1 us per tick.
       
       2) Previously CLOCK_ADJTIME_PERIOD was in units of 1/100th of second.
          Change to milliseconds to be more generally useful unit.
          Change setting name to CLOCK_ADJTIME_PERIOD_MS to make the unit change
          easier to notice.
       
       3) Previously CLOCK_ADJTIME_SLEWLIMIT was in percentage.
          Most clock crystals have better accuracy than 1%, so the minimum slew
          rate was excessive. Change to CLOCK_ADJTIME_SLEWLIMIT_PPM with setting
          value in parts per million.
       
       4) No need to use floating point math in clock_adjtime.c.
   
   ## Impact
   
   Users who have used `CLOCK_ADJTIME_PERIOD` and `CLOCK_ADJTIME_SLEWLIMIT` 
settings should update their configuration. New `CLOCK_ADJTIME_PERIOD_MS` is 
10x the old period value, and new `CLOCK_ADJTIME_SLEWLIMIT_PPM` is 10000 times 
the old slewlimit.
   
   ## Testing
   
   Tested on custom STM32 board with the `adjtime` example program.
   
   ## Questions
   
   @michallenc I couldn't find the significance of the `Should be between 0.95 
and 0.99.` comment that was previously in help text for `CLOCK_ADJTIME_PERIOD`. 
To me it appears that the desirable value for this setting will depend entirely 
on what code will be calling `adjtime()` and how often.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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

Reply via email to