
MPU Violations
NOTE:
Prefetching of the CPU can trigger a violation.
When a segment contains code that is
executed by the CPU, the CPU pipeline prefetches the next two higher words beyond the
current Program Counter (PC), and this prefetch is treated as a read or fetch from the MPU
perspective. This prefetching also occurs if a "jump" instruction is initiated from the actual
address of the PC. A consequence of this can be that a "jump" is the last word in a segment
that is open for code execution, but the next higher segment has only read access rights.
This causes an access rights violation on executing the "jump". To avoid this, code for
execution must stop two words below the highest word of a segment.
6.4
MPU Violations
6.4.1 Interrupt Table and Reset Vector
The interrupt vector table and the reset vector are located at addresses 0FF80h to 0FFFFh. It is possible
to define a segment that includes this address space with restricted access rights. If an interrupt or a reset
occurs, and this segment is read protected, the MPU automatically allows access to the interrupt vector
memory space. In this scenario, only the interrupt vector table is accessible. Access to the interrupt
routine itself is not automatically enabled.
NOTE:
Only the interrupt table and the reset vector are opened on an interrupt or reset occurrence.
If the application protects the segment from execution rights that contains the interrupt
routine itself, a violation occurs.
6.4.2 Violation Handling
The handling of access rights violations can be selected for each segment with the MPUSEGxVS bit in the
MPUSAM register.
By default (MPUSEGxVS = 0), any access right violation causes the respective violation flag to be set.
Setting MPUSEGxVS = 1 causes a PUC to occur upon violation. In either case, the illegal instruction on a
protected memory segment is not executed.
Upon an access rights violation, the data bus content (MDB) is driven with 03FFFh until the next valid data
is available.
256
Memory Protection Unit (MPU)
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated