Closed Liuyux closed 1 year ago
Hi @Liuyux - for any interrupt calling ThreadX APIs, including the timer interrupt, you need to call tx_thread_context_save and _restore at the beginning and end of the interrupt, respectively.
Hi @Liuyux - for any interrupt calling ThreadX APIs, including the timer interrupt, you need to call tx_thread_context_save and _restore at the beginning and end of the interrupt, respectively.
Thank you for your answer.^^
Closing
Hi scott, In contrast to RISCV-32's timer interrupt function, RISCV-64 writes _tx_timer_interrupt in c without _tx_thread_context_save and _tx_thread_context_restore. When the timer interrupt is generated, I make the CPU jump directly to timer1_plic_IRQHandler, which seems unable to perform thread scheduling normally. May I ask whether I should jump to _tx_thread_schedule after the timer interrupt function is executed, as in the _tx_thread_context_restore function?