xiaoxiang781216 commented on pull request #5782: URL: https://github.com/apache/incubator-nuttx/pull/5782#issuecomment-1079688130
@pussuw @jlaitine sorry, I may mix use OpenSBI and RISCV SBI in the discussion, so let me clarify what I mean the interface is the spec documented here: https://github.com/riscv-non-isa/riscv-sbi-doc/releases/download/v1.0.0/riscv-sbi.pdf The related function is: ``` Chapter 6. Timer Extension (EID #0x54494D45 "TIME") This replaces legacy timer extension (EID #0x00). It follows the new calling convention defined in v0.2. 6.1. Function: Set Timer (FID #0) struct sbiret sbi_set_timer(uint64_t stime_value) Programs the clock for next event after stime_value time. stime_value is in absolute time. This function must clear the pending timer interrupt bit as well. If the supervisor wishes to clear the timer interrupt without scheduling the next timer event, it can either request a timer interrupt infinitely far into the future (i.e., (uint64_t)-1), or it can instead mask the timer interrupt by clearing sie.STIE CSR bit. ``` sbi_set_timer is more flexible than riscv_sbi_ack_timer since riscv_sbi_ack_timer can't implement tickless mode which is very important for all battery powered device. -- 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: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org