Skip to content
Commit 3f395f56 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Ioannis Glaropoulos
Browse files

arch: arm: aarch32: Add memory barriers to arch_cpu_idle



This commit adds the required memory barriers to the `arch_cpu_idle`
function in order to ensure proper idle operation in all cases.

1. Add ISB after setting BASEPRI to ensure that the new wake-up
  interrupt priority is visible to the WFI instruction.

2. Add DSB before WFI to ensure that all memory transactions are
  completed before going to sleep.

3. Add ISB after CPSIE to ensure that the pending wake-up interrupt
  is serviced immediately.

Co-authored-by: default avatarIoannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
parent ba0bcaf4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment