Hi @Satyajit_Patil,
The OS design is outside the scope of our complementary online technical support.
I understand that you want to restrict ISR memory access to OS memory. However, since both the OS and ISRs run in privileged mode, the MPU cannot differentiate between them based on privilege level alone.
As you correctly mentioned, using the PID (Process ID) mechanism is the only hardware-supported method to distinguish access rights between the OS and ISRs when both operate in privileged mode.
The MPU supports PID-based access control, allowing different access rights to the same memory region depending on the active PID. To implement this:
- Assign a unique PID to the OS and another to each ISR or ISR group.
- Before jumping to an ISR, switch the MCM_PID register to the ISR’s PID.
Note: MCM_PID can only be written in Supervisor mode.
Regarding the fault exception:
Since you’re observing a reset, it’s likely a core lockup reset (RCM_SRS[LOCKUP]), which typically occurs due to an exception during vector fetch. Please verify the MPU region configuration for the memory area where the vector table and handler code reside.
You also mentioned a bus fault. Could you please dump and share the MPU register values at the time of the exception?
Keep in mind: All MPU violations trigger a Bus Fault exception, not a MemManage exception, because the MPU is implemented on the bus level, not the core.
Regards,
Daniel