cpu/cortexm_common: remove special cortexm_sleep handle for stm32l152re
__set_PRIMASK(state) had been directly inlined to avoid a hardfault that occured when branching after waking up from sleep with DBG_STANDBY, DBG_STOP or DBG_SLEEP set in DBG_CR. The hardfault occured when returning from the branch to irq_restore, since the function is now inlined the branch does not happen either. Refer to #14015 for more details.
This commit is contained in:
parent
4ad3164599
commit
b5e4224a6f
@ -170,12 +170,7 @@ static inline void cortexm_sleep(int deep)
|
||||
unsigned state = irq_disable();
|
||||
__DSB();
|
||||
__WFI();
|
||||
#if defined(CPU_MODEL_STM32L152RE)
|
||||
/* STM32L152RE crashes if branching to irq_restore(state). See #11830. */
|
||||
__set_PRIMASK(state);
|
||||
#else
|
||||
irq_restore(state);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user