Commit 9933a219 authored by Jonatan Antoni's avatar Jonatan Antoni
Browse files

Core(M): Fixed ARM_MPU_Disable barriers. (#458)

Change-Id: Ia8b10728563f8591816745c9490e1598aecc1978
parent f13df2f2
......@@ -202,8 +202,7 @@ __STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
*/
__STATIC_INLINE void ARM_MPU_Disable(void)
{
__DSB();
__ISB();
__DMB();
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
#endif
......
......@@ -141,8 +141,7 @@ __STATIC_INLINE void ARM_MPU_Enable(uint32_t MPU_Control)
*/
__STATIC_INLINE void ARM_MPU_Disable(void)
{
__DSB();
__ISB();
__DMB();
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
#endif
......@@ -167,8 +166,7 @@ __STATIC_INLINE void ARM_MPU_Enable_NS(uint32_t MPU_Control)
*/
__STATIC_INLINE void ARM_MPU_Disable_NS(void)
{
__DSB();
__ISB();
__DMB();
#ifdef SCB_SHCSR_MEMFAULTENA_Msk
SCB_NS->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment