v01d opened a new issue #1725: URL: https://github.com/apache/incubator-nuttx/issues/1725
Currently, there are the following timer low-level interfaces: * timer_lowerhalf_s: supports relative timeouts, does not report underlying counter (only time remaining to next timeout) * oneshot_lowerhalf_s: supports relative timeout firing only once, stops after expiration (not free running) * rtc_lowerhalf_s: represents an always-on (battery backed) free running monotonic timer with absolute alarms For the purpose of generically supporting tickless system timer using a hardware timer which supports free running and a capture channel (for example, "advanced" STM32 timers) a new interface should be added. This kind of timer can technically be exposed as a rtc_lowerhalf_s but this requires handling the timer overflow internally to provide the illusion of a monotonic counter internally. To avoid repeating this for every possible implementation, this new interface would expose the overflow as a separate callback. This new interface can then be used in arch_alarm.c and replace the implementation based on onehost() which currently re-starts the oneshot timer manually which is suboptimal when the hardware supports such a timer. Let me know if you think this is a good idea or if you would prefer to expose such timers as rtc_lowerhalf_s better. In such case, we should consider removing the SCHED_TICKLESS_ALARM option since it could be replaced with CONFIG_RTC_HIRES. ---------------------------------------------------------------- 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: us...@infra.apache.org