wangchdo opened a new pull request, #18174: URL: https://github.com/apache/nuttx/pull/18174
## Summary **Change1:** The hrtimer subsystem is independent of the OS scheduler tick mechanism and tickless mode. In fact, it operates below the OS scheduler and provides scheduler tick support through an hrtimer object. Therefore, it must always be able to reprogram the hardware timer to achieve nanosecond-level resolution. A recent update restricted hardware timer reprogramming to tickless mode only. As a result, hrtimer no longer functions correctly when the scheduler is running in tick-based mode. This change removes the incorrect dependency on tickless mode and restores proper hrtimer operation. **Change2:** add support for tickless with hrtimer ## Impact Fix the in-proper update of hrtimer module, this change is isolated in hrtimer moduler no impact to other NuttX parts. ## Testing depends on **ostest passed on [a2g-tc397-5v-tft](rv-virt:smp64) with hrtimer enabled on both non-tickless and tickless node ** **1. tickless mode** ``` NuttShell (NSH) nsh> nsh> uname -a NuttX 0.0.0 d819e61456-dirty Jan 27 2026 11:11:00 risc-v rv-virt nsh> nsh> ostest (...) user_main: smp call test smp_call_test: Test start smp_call_test: Call cpu 0, nowait smp_call_test: Call cpu 0, wait smp_call_test: Call cpu 1, nowait smp_call_test: Call cpu 1, wait smp_call_test: Call cpu 2, nowait smp_call_test: Call cpu 2, wait smp_call_test: Call cpu 3, nowait smp_call_test: Call cpu 3, wait smp_call_test: Call cpu 4, nowait smp_call_test: Call cpu 4, wait smp_call_test: Call cpu 5, nowait smp_call_test: Call cpu 5, wait smp_call_test: Call cpu 6, nowait smp_call_test: Call cpu 6, wait smp_call_test: Call cpu 7, nowait smp_call_test: Call cpu 7, wait smp_call_test: Call multi cpu, nowait smp_call_test: Call in interrupt, wait smp_call_test: Call multi cpu, wait smp_call_test: Test success user_main: hrtimer test End of test memory usage: VARIABLE BEFORE AFTER ======== ======== ======== arena 1fc1080 1fc1080 ordblks 6 11 mxordblk 1faa1e0 1f72e98 uordblks 107c8 1dbf8 fordblks 1fb08b8 1fa3488 Final memory usage: VARIABLE BEFORE AFTER ======== ======== ======== arena 1fc1080 1fc1080 ordblks 1 11 mxordblk 1fb5f70 1f72e98 uordblks b110 1dbf8 fordblks 1fb5f70 1fa3488 user_main: Exiting ostest_main: Exiting with status 0 ``` **2. non-tickless mode** ``` NuttShell (NSH) nsh> nsh> uname -a NuttX 0.0.0 d819e61456-dirty Jan 27 2026 11:19:53 risc-v rv-virt nsh> nsh> ostest (...) user_main: smp call test smp_call_test: Test start smp_call_test: Call cpu 0, nowait smp_call_test: Call cpu 0, wait smp_call_test: Call cpu 1, nowait smp_call_test: Call cpu 1, wait smp_call_test: Call cpu 2, nowait smp_call_test: Call cpu 2, wait smp_call_test: Call cpu 3, nowait smp_call_test: Call cpu 3, wait smp_call_test: Call cpu 4, nowait smp_call_test: Call cpu 4, wait smp_call_test: Call cpu 5, nowait smp_call_test: Call cpu 5, wait smp_call_test: Call cpu 6, nowait smp_call_test: Call cpu 6, wait smp_call_test: Call cpu 7, nowait smp_call_test: Call cpu 7, wait smp_call_test: Call multi cpu, nowait smp_call_test: Call in interrupt, wait smp_call_test: Call multi cpu, wait smp_call_test: Test success user_main: hrtimer test End of test memory usage: VARIABLE BEFORE AFTER ======== ======== ======== arena 1fc11e0 1fc11e0 ordblks 6 11 mxordblk 1f77500 1f77500 uordblks dd58 1dbf8 fordblks 1fb3488 1fa35e8 Final memory usage: VARIABLE BEFORE AFTER ======== ======== ======== arena 1fc11e0 1fc11e0 ordblks 1 11 mxordblk 1fb60d0 1f77500 uordblks b110 1dbf8 fordblks 1fb60d0 1fa35e8 user_main: Exiting ostest_main: Exiting with status 0 ``` -- 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]
