This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is critical section needed for glitch-less implementation of CPU sleep?

Hello,

I have the same question as mentioned in this article:

https://devzone.nordicsemi.com/f/nordic-q-a/19252/how-to-avoid-interrupt-handling-is-not-missed-with-sd_app_evt_wait

Additional question, just to make sure: For a glitch-free implementation,  do I need the second code part including the "sd_nvic_critical_region_enter(...);"?

Or does it also work (glitch free) with the first implementation without the critical section? I just want to make sure, if I am missing something. In my opinion, I need the critical section absolutely.

Thank you,
Regards

Parents
  • Hello,

    Would it be possible to include some snippets of your code here? I'm not sure I understand what you're trying to achieve in your code. E.g., Is it some code you have that has to be processed without interruption from other higher priority interrupts? Is it timing critical and/or exposed to race conditions from other application-level interrupts? Are you using a scheduler? 

    Thanks,

    Vidar

Reply
  • Hello,

    Would it be possible to include some snippets of your code here? I'm not sure I understand what you're trying to achieve in your code. E.g., Is it some code you have that has to be processed without interruption from other higher priority interrupts? Is it timing critical and/or exposed to race conditions from other application-level interrupts? Are you using a scheduler? 

    Thanks,

    Vidar

Children
Related