v01d commented on pull request #1705:
URL: https://github.com/apache/incubator-nuttx/pull/1705#issuecomment-687298575


   > The keypoint isn't whether the hardware save the time as a counter or as 
y/m/d/h/m/s/us, because it is very easy to convert between these two 
representation(mktime and gmtime_r). The major difference is whether the timer 
is in an always on domain, and never stop counting. If it's true, it's better 
to implement as rtc_lowerhalf_s, otherwise it should implement as 
oneshot_lowerhalf_s or timer_lowerhalf_s.
   
   See my response to your other comment. I don't think it is appropriate to 
consider this timer anything different than a nRF52 TIMER or STM32 TIM, with 
the difference that indeed it continues to work during WFI/WFE. Exposing the 
timer as oneshot/rtc means that you have to give the illusion of a timer which 
does not wrap around. the timer_lowerhalf_s reflects better the functionality 
of the timer. The only complication is with the auto-clear but that can be 
addressed with PPI as I mentioned. Note that nrf52_tim_lowerhalf.c is 
implemented in the same way but in this case the TIMER peripheral indeed 
supports the auto-clear by hardware on its own.
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to