Attached code is an example to show how the SMPU along with SPU module can be configured to protect the Secure/Non-Secure Write/read protection of the L2 SRAM space from the MDMA as a master.
SMPU is configured to restrict an access to the L2 memory.
SPU is configured to allow MDMA do secure/non-secure access to L2 space.