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 2020/09/04 18:28:27 UTC

[GitHub] [incubator-nuttx] v01d opened a new issue #1717: consolidate system timer handling in architectures: provide either via ARCH_TIMER/ARCH_ALARM or not, not both

v01d opened a new issue #1717:
URL: https://github.com/apache/incubator-nuttx/issues/1717


   The ARCH_TIMER and ARCH_ALARM drivers implement the required logic for handling NuttX system timer, both supporting the case of TICKLESS or non TICKLESS mode. These "drivers" require are based on abstract `timer_lowerhalf_s` and `oneshot_lowerhalf_s` interfaces, which the architecture can provide. Moreover, the ARM systick is already exposed as a `timer_lowerhalf_s` and thus can be automatically used for tickless/non-tickless with minimal code.
   Finally, these drivers implement `up_mdelay()` using the underlying timer instead of a hardcoded loop which requires manual tuning.
   
   Right now different some architectures employ this support but it is considered as an extra option and the corresponding up_timer_*/up_alarm_* interfaces, systick handling and "dumb" up_mdelay() is conditionally compiled. It would be much better to have an arch implementation decide how it will expose the system timer (either via these "drivers" or manually, if for example minimizing code size is important).
   
   To address this issue:
   - [ ] These facilities must be documented (how each driver is operated, what the architecture needs to do to use it, how kconfig defines should be used so that proper configuration is done without user having to combine appropriate options)
   - [ ] The documentation should indicate that supporting both implementations in an architecture is deprecated (and thus PRs for new architectures should follow this accordingly)
   - [ ] Existing architectures should slowly be changed to use either of the two approaches and not both
   
   Related issues/PRs: #1716 #1710 #1705 (nRF52 implementation of system timer using these drivers) 


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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on issue #1717: consolidate system timer handling in architectures: provide either via ARCH_TIMER/ARCH_ALARM or not, not both

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on issue #1717:
URL: https://github.com/apache/incubator-nuttx/issues/1717#issuecomment-687572672


   How about we move TIMER_ARCH/ALARM_ARCH from drivers/Kconfig to sched/Kconfig, like this:
   ```
   choice 
   
   config TICKLESS_ALARM
   
   config TICKLESS_ONESHOT_DRIVER
   
   config TICKLESS_TIMER
   
   config TICKLESS_TIMER_DRIVER
   
   endchoice
   ```
   And move the arch_timer.c/arch_alarm.c to sched/ folder.


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