cpu/cortexm: disable interrupts before sleeping#6499
cpu/cortexm: disable interrupts before sleeping#6499PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
Conversation
0a0ba13 to
6e364b9
Compare
6e364b9 to
3da9ceb
Compare
|
Acutally, I changed the fix: The ARM Cortex-M reference manual advises to disable global interrupt before going to sleep. This prevents interrupts that might be triggered right between the execution of the __DSB and the __WFI instruction and would be subsequently lost. Further there seems to be some hardware issue on some Cortex MCUs (e.g. on the |
PeterKietzmann
left a comment
There was a problem hiding this comment.
@haukepetersen great! Please provide a backport PR.
|
Did the backport for you in #6505 |
|
@haukepetersen, who did this fix, and @kaspar030 who did the new samd21/periph/pm.c. Is this a change that should be made universally? There are 4 places in the code where cortex chips execute __DSB(); __WFI(); and this is only one of them. The other three are in various periph/pm.c files. Should they be changed too? |
|
There is a new release pending so at this point the backporting-needed label is only noise ;-) |
fixes #6484 (though temporarily for now)
A real fix will be provided with #6239