Hi,
IDE: S32DS3.5
Board:S32k146-EVB
SDK:S32_SDK_S32K1xx_RTM_4.0.2
Demo:
S32_SDK_S32K1xx_RTM_4.0.2\examples\S32K146\driver_examples\system\mpu_memory_protection
S32_SDK_S32K1xx_RTM_4.0.2\examples\S32K146\driver_examples\system\mpu_pal_memory_protection
I used this demo to check MPU function, the demo can run success.
Then I want know if the MPU triger access denied, which exception that will be triger,
so I add this test code to demo,before call MPU_Init,this code add:
S32_SCB->SHCSR |= 0x70000; /* TODO Add enable all fault check */
And I add some fault handler function:
void MemManage_Handler(void)
{
NOP();
}
void BusFault_Handler(void)
{
NOP();
}
void UsageFault_Handler(void)
{
NOP();
}
Add breakpoint to NOP(), when I run the test, it will be only enter BusFault_Handler.
Question 1:When triger MPU access denied, which execption it maybe enter.
Question 2:If it should enter MemManage_Handler, how to config the register.
Question 3:All kinds of MPU access denied, it enter same execption or not.
Thanks!
John.zhou
已解决! 转到解答。
HI @John_zhou2,
This is because the ARM CM4 MPU that would detect a MemManage fault is not implemented on the S32K1xx series.
Instead, there is an NXP System MPU implemented at the crossbar switch, any denied access results in a Bus fault.
BR, Daniel
HI @John_zhou2,
This is because the ARM CM4 MPU that would detect a MemManage fault is not implemented on the S32K1xx series.
Instead, there is an NXP System MPU implemented at the crossbar switch, any denied access results in a Bus fault.
BR, Daniel