lupyuen opened a new pull request, #11472: URL: https://github.com/apache/nuttx/pull/11472
## Summary The implementation of the RISC-V Timer for BL808 SoC is incomplete. This PR implements the BL808 RISC-V Timer by calling OpenSBI. The code is derived from NuttX for RISC-V QEMU. The implementation of `up_timer_initialize` with OpenSBI is [explained in this article](https://lupyuen.github.io/articles/nim#appendix-opensbi-timer-for-nuttx). ## Impact With this PR, `sleep` and other Timer Functions will work correctly on BL808 SoC, instead of hanging indefinitely. No impact on other SoCs. ## Testing We tested with `ostest` on Ox64 BL808 SBC: ```bash $ tools/configure.sh ox64:nsh ``` ### Before PR `ostest` hangs when accessing the RISC-V Timer: ```text nsh> ostest ... ostest_main: Started user_main at PID=7 (Hang) ``` [(NuttX Log)](https://gist.github.com/lupyuen/37d5d2d27ed10f37e6c586b715cc33ef) ### After PR `ostest` works correctly with the RISC-V Timer and terminates properly: ```text nsh> ostest ... user_main: Exiting ostest_main: Exiting with status -1 nsh> ``` [(NuttX Log)](https://gist.github.com/lupyuen/c90ab66092480578eed7698635cd5abe) -- 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]
