cpu/cortexm_common: replace irq_restore by __set_PRIMASK for stm32l152re
- The __NOP() that was added in #8518 is now remooved. - When DBG_STANDBY, DBG_STOP or DBG_SLEEP are set in DBG_CR a hardfault occurs on wakeup from sleep. This was first diagnosed in #8518. When enabled, a hardfault occured when returning from a branch to irq_restore() we avoid the call by inlining the function call. See #11830 for more details.
This commit is contained in:
parent
4139370a87
commit
d075e55bb4
@ -171,10 +171,11 @@ static inline void cortexm_sleep(int deep)
|
|||||||
__DSB();
|
__DSB();
|
||||||
__WFI();
|
__WFI();
|
||||||
#if defined(CPU_MODEL_STM32L152RE)
|
#if defined(CPU_MODEL_STM32L152RE)
|
||||||
/* STM32L152RE crashes without this __NOP(). See #8518. */
|
/* STM32L152RE crashes if branching to irq_restore(state). See #11830. */
|
||||||
__NOP();
|
__set_PRIMASK(state);
|
||||||
#endif
|
#else
|
||||||
irq_restore(state);
|
irq_restore(state);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user