cpu/cortexm_common: add NOP after WFI to avoid hardfault on stm32l152

This commit is contained in:
Francisco Acosta 2018-02-07 23:36:10 +01:00
parent 368818aa23
commit ac9328381c

View File

@ -107,6 +107,10 @@ static inline void cortexm_sleep(int deep)
unsigned state = irq_disable();
__DSB();
__WFI();
#if defined(CPU_MODEL_STM32L152RE)
/* STM32L152RE crashes without this __NOP(). See #8518. */
__NOP();
#endif
irq_restore(state);
}