cpu/cortexm_common: add NOP after WFI to avoid hardfault on stm32l152
This commit is contained in:
parent
368818aa23
commit
ac9328381c
@ -107,6 +107,10 @@ static inline void cortexm_sleep(int deep)
|
|||||||
unsigned state = irq_disable();
|
unsigned state = irq_disable();
|
||||||
__DSB();
|
__DSB();
|
||||||
__WFI();
|
__WFI();
|
||||||
|
#if defined(CPU_MODEL_STM32L152RE)
|
||||||
|
/* STM32L152RE crashes without this __NOP(). See #8518. */
|
||||||
|
__NOP();
|
||||||
|
#endif
|
||||||
irq_restore(state);
|
irq_restore(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user