Chapter 4 Memory Protection Unit (S12XMPUV1)
MC9S12XE-Family Reference Manual Rev. 1.21
Freescale Semiconductor
231
Because of an order from the United States International Trade Commission, BGA-packaged product lines and partnumbers
indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010
4.3.1.1
MPU Flag Register (MPUFLG)
Figure 4-3. MPU Flag Register (MPUFLG)
Read: Anytime
Write: Write of 1 clears ag, write of 0 ignored
Table 4-3. MPUFLG Field Descriptions
If the AEF bit is set further violations are not captured into the MPU status registers. The status of the AEF
bit has no effect on the access restrictions, i.e. access restrictions for all masters are still enforced if the
AEF bit is set. Also, the non-maskable hardware interrupt for violating accesses coming from the S12X
CPU is generated regardless of the state of the AEF bit.
Address: Module Base + 0x0000
76543210
R
AEF
WPF
NEXF
0000
SVSF
W
Reset
0
00000
Field
Description
7
AEF
Access Error Flag — This bit is the CPU access error interrupt ag. It is set if a CPU access violation has
occurred. At the same time this bit is set, all the other status ags in this register and the access violation
address bits in the MPUASTATn registers are captured. Clear this ag by writing a one.
Note: If a CPU access error is agged and both the WPF bit and the NEXF bit are zero, the access violation
was caused by an access to memory not covered by the MPU descriptors.
Note: While this bit is set, the CPU in supervisor state (“Master 0”) can read from and write to the peripheral
register space even if there is no memory protection descriptor explicitly allowing this. This is to prevent
the case that the CPU cannot clear the AEF bit if the registers are write protected for the CPU in
supervisor state.
Note: This bit should only be cleared by an access from the S12X CPU. Otherwise, when using one of the
other masters (such as the XGATE) to clear this bit, the status ags and the address status registers
may not get updated correctly if a CPU access causes a violation in the same bus cycle.
6
WPF
Write-Protect Violation Flag — This ag is set if the current CPU access violation has occurred because of
an attempt to write to memory congured as read-only. The WPF bit is read-only; it will be automatically
updated when the next access violation is agged with the AEF bit.
5
NEXF
No-Execute Violation Flag — This bit is set if the current CPU access violation has occurred because of an
attempt to fetch code from memory congured as No-Execute. The NEXF bit is read-only; it will be
automatically updated when the next access violation is agged with the AEF bit.
0
SVSF
Supervisor State Flag — This bit is set if the current CPU access violation occurred while the CPU was in
supervisor state. This bit is cleared if the current CPU access violation occurred while the CPU was in user
state. The supervisor state ag is read-only; it will be automatically updated when the next CPU access
violation is agged with the AEF bit.