acassis commented on PR #17345:
URL: https://github.com/apache/nuttx/pull/17345#issuecomment-3562672787

   > > @Fix-Point See the message we got in the Discord:
   > > "Parthiban (Linumiz) — 10/16/25, 11:51 PM Morgen. Currently am analyzing 
to implement system timer for a new architecture. There are 3 timers available,
   > > ```
   > > timer
   > > oneshot
   > > arch timer
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > I couldn't find the difference and when to use what. System timer for 
the tick / scheduler needs to be arch timer? Thanks."
   > > Please include an brief explanation about it in your Documentation 
introduction, it will help people that are starting to use NuttX to get some 
better understanding
   > 
   > The current driver abstraction in NuttX's time subsystem can be broadly 
categorized into four layers: <img alt="image" width="556" height="276" 
src="https://private-user-images.githubusercontent.com/170061473/517165661-b0802f8b-f98a-4e31-845b-87a8f14c6e80.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjM3MjU0MzEsIm5iZiI6MTc2MzcyNTEzMSwicGF0aCI6Ii8xNzAwNjE0NzMvNTE3MTY1NjYxLWIwODAyZjhiLWY5OGEtNGUzMS04NDViLTg3YThmMTRjNmU4MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMTIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTEyMVQxMTM4NTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iOGYzZWUyMjg0MmZlMzQ5Mzc4M2RlN2EwN2JjODk3YzhjY2RiZDU2M2M3NDdlNzQ4Mjc1NWRiZTEyN2YwMDBkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.k219u-y4kOzwsyiWOOy49qxTV7majDttuZit8OeoLeg";>
   > 
   > **Hardware Timer Drivers**: Includes implementations of various hardware 
timer drivers. **Timer Driver Abstraction**: Such as `Oneshot` and `Timer`, 
which provide oneshot/periodical timer hardware abstraction. **OS Timer 
Interfaces**: `Arch_Timer(up_timer_*)` and `Arch_Alarm(up_alarm_*)`, offering 
relative timer (trigger an event with a certain delay) and absolute timer 
(trigger an event at a certain time) interfaces. **Software Timer 
Abstraction**: The `wdog` manages software timers and provides a unified timer 
API to upper layers.
   > 
   > The timer driver abstraction is not mandatory. If the driver is simple 
enough (e.g., just providing a periodic tick), the OS Timer interfaces 
`Arch_Timer` can be implemented directly, bypassing the timer driver 
abstraction layer.
   > 
   > The purpose of the timer driver abstraction is to simplify driver 
implementation, improve performance, and enhance the reusability of driver code.
   > 
   > Given NuttX's current state, for better performance and simplicity, I 
recommend that periodic tick timers directly implement the `up_timer_*` 
interfaces, and non-periodic timers implement the new count-based `oneshot` 
driver abstraction interfaces.
   
   Thank you very @Fix-Point ! Could you please include this information (with 
this diagram) in the Timers section:
   
https://nuttx.apache.org/docs/latest/components/drivers/character/timers/index.html
 ?


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to