Hi,
the main difference between SMPU and CMPU is that SMPU is implemented on crossbar, so we can configure access right for all masters. CMPU is implemented on core. The key point is that CMPU is used to check only core accesses. It does not affect other masters. For example, let’s say you configure certain RAM area as read-only (this will be configured on CMPU on core 0, for example). Then core 0 can’t write this area – exception would be triggered. However, this restriction is not visible for other masters like DMA because it is core feature, not system feature. That means other master can write this area despite of CMPU. This is the reason why also SMPU is implemented.
I shared sample code for CMPU initialization for MPC5744P here on the community:
https://community.nxp.com/docs/DOC-335468
There’s also link to excel configurator (https://community.nxp.com/docs/DOC-335468) which can help you to easily generate initialization code as required.
And here are sample codes for SMPU written for MPC5748G microcontroller. But the principle is still the same:
https://community.nxp.com/docs/DOC-328346
https://community.nxp.com/docs/DOC-332545
Regards,
Lukas