![]() |
MKM34Z256VLx7 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
The Memory Protection Unit (MPU) module includes 8 program-visible 128-bit region descriptors. The module is programmable only in privileged mode. Each region supports read, write and execute protection attributes for CM0+ and DMA masters and privileged secure and user secure/non-secure modes. It detects access protection errors if a memory reference does not hit in any memory region, or if the reference is illegal in all hit memory regions. Accesses that are not allowed generate Hard Fault.
Up to three MPU region descriptors are configured in software example below. The first, RGD1 descriptor, is configured to allow RWX supervisor and user secure/non-secure accesses and protects flash memory section. The second, RGD2 descriptor, enables RW supervisor accesses and W user accesses to the spvr_data[100]
memory array. Finally, RGD3 descriptor, enables both RW supervisor and user accesses to the user_data[100]
memory array. It is shown that only access that is not allowed and terminates by Hard Fault is an attempt to read from the spvr_data[100]
memory array in user mode. The Hard Fault occurs due to RGD2 region descriptor hit.
IAR EWARM 7.40.7 | KEIL uVision 5.15 | CrossWorks 3.6 | ATOLLIC TrueStudio 5.3.0 | Kinetis Design Studio 3.0.0 |
---|---|---|---|---|
♦ | ♦ | ♦ | ♦ | ♦ |