Is calling minar::platform::getTime() safe in IRQ context

Hi all,

I am trying to write a software-based debouncing program for a switch-controlled LED.

My idea is obtaining the timestamp when entering the IRQ context and passing the timestamp as a parameter to the user-space context. When entering the user-space context, the task will compare its timestamp with the timestamp of previous task to realize debouncing.

My question is “is calling minar::platform::getTime() safe in IRQ context”? If it is not safe, is there any way to implement a software-based debouncing?

Thank you.

Best regards,


should be interrupt safe. It should just read timer registers to get time in ticks.

I see. Thank you.