Hi !
Yes,
I think after configuration of 1-5 static regions and enabling of MPU back, I should disable Reqion 0 for all masters ( Debug master 1 remains).
/* Disable MPU. */
SYSMPU->CESR &= ~SYSMPU_CESR_VLD_MASK;
/* SYSMPU Initialisation & Enable. */
SYSMPU_Init(SYSMPU, &userConfig1);
/* Make sure that all the registers are set before proceeding. */
__DSB();
__ISB();
...
/* Invalidate Region 0 for Master 0, remove background region with wide access right. */
#if 0
master0 = prvComposeRegionRightMPU(kSYSMPU_SupervisorEqualToUsermode, kSYSMPU_UserNoAccessRights);
SYSMPU_SetRegionRwxMasterAccessRights(SYSMPU, 0, 0, &master0);
#endif
Can I do this on fly or what is the best way ?
For what reason WriteBuffer should be disabled before MPU configuration ?
So I'm really interesting about right sequence for init MPU ( reinit) what I can use in prvSetupMPU(void) function.
By default MPU is enabled and it might have some effect for right sequence for disable it, reconfigure and remove Region0 with super wide accesses for Core.
By the way, looks like in User Mode, I can get read/write access to simple peripheral areas (LPUART0 for example.).
Even this address area is configured in MPU with rights kSYSMPU_SupervisorEqualToUsermode + kSYSMPU_UserReadWrite).
Is this generic feature of K82 ( in ARM it might be possible) or some other way should be used for access
LPUART area from User like task ?
Regards,
Eugene