SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
The MPU module generates the following interrupts when there is any kind of MPU violation:
Interrupt | Description |
---|---|
mpu_addr_err_intr | Addressing violation interrupt |
mpu_prot_err_intr | Protection violation interrupt. |
The mpu_addr_err_intr interrupt occurs when a read or write access is made to a non-existent register address in the MPU configuration space.
The mpu_prot_err_intr interrupt occurs when there is a protection violation. Two kinds of protection violation is possible.
When the access on the input bus violates the MPU rules as defined in Functional Operation section or
When the access violates the protection of MPU configuration registers as defined in Protection of the MPU Configuration Registers section.
The transfer parameters that caused the above violations are saved in MPU.FAULT_ADDRESS and MPU.FAULT_STATUS registers. This violation status MMRs can be cleared by writing to MPU.FAULT_CLEAR register.
The above interrupts can be enabled by writing to MPU.INTERRUPT_ENABLE register. The register MPU.INTERRUPT_RAW_STATUSSET register can be read to know the raw interrupt status. The register MPU.INTERRUPT_ENABLED_STATUSCLEAR can be read to know the enabled interrupt status. The interrupt can be cleared by writing ‘1’ to MPU.INTERRUPT_ENABLED_STATUSCLEAR register.
MPU Interrupt Aggregation
The error Interrupts from all MPUs in the device are aggregated and provided to each R5SS core as R5FSSx_COREy_INTR_MPU_ADDR_ERRAGG (#69) and R5FSSx_COREy_INTR_MPU_PROT_ERRAGG(#70) interrupts.
This aggregated address error interrupt can be controlled by the MMR MSS_CTRL.MPU_ADDR_ERRAGG_R5SSx_CPUy_MASK. There is one register per associated R5SS Core. Each bit represents one MPU which can be masked or enabled to generate the aggregated interrupt. The status of the Address error interrupt can be read from the MMRs MSS_CTRL.MPU_ADDR_ERRAGG_R5SSx_CPUy_STATUS and the raw status can be read from MSS_CTRL.MPU_ADDR_ERRAGG_R5SSx_CPUy_STATUS_RAW . The aggregated interrupt can be cleared by writing ‘1’ to the MSS_CTRL.MPU_ADDR_ERRAGG_R5SSx_CPUy_STATUS register. The raw status can be cleared by writing ‘1’ to the MSS_CTRL.MPU_ADDR_ERRAGG_R5SSx_CPUy_STATUS_RAW register.
Note: To clear the aggregated status, the source MPU error interrupt must be cleared first followed by clearing the aggregated interrupt STATUS register.
Similarly the aggregated protection error interrupt is associated with the registers MSS_CTRL.MPU_PROT_ERRAGG_R5SSx_CPUy_MASK, MSS_CTRL.MPU_PROT_ERRAGG_R5SSx_CPUy_STATUS and MSS_CTRL.MPU_PROT_ERRAGG_R5SSx_CPUy_STATUS_RAW.
Similar to the above mechanism, the interrupts from all the MPUs in the device are aggregated and provided to HSM-ESM as HSM_MPU_AGGR_ADDR_ERR(#22) and HSM_MPU_AGGR_PROT_ERR(#23) Error.
The relevant MMRs to mask/enable individual MPU errors is HSM_SOC_CTRL.HSM_MPU_ERRAGG_MASK0 and HSM_SOC_CTRL. HSM_MPU_ERRAGG_MASK1 respectively.
Note: The MPU source interrupt can be cleared only by the entity who has access to the respective MPU config space (Typically HSM. However, other cores can be given access to MPU by opening up the HSM_SLV MPU). The aggregated interrupt can be cleared by the respective R5 Core themselves, by writing to the respective aggregated status register once the source interrupt is cleared.
CPU Behavior when its access is faulted by MPU
When a violation is triggered in a MPU, the corresponding R5 CPU whose access caused this violation will receive a suitable response from the Bus interconnect.
When a MPU present on CORE VBUSM interconnect violates, both Read or Write transaction causing the violation will result in the corresponding R5 Core taking an Abort exception.
When a MPU present on CORE VBUSP interconnect violates during a Read transaction, the corresponding R5 Core will take an Abort exception.
When a MPU present on the CORE VBUSP interconnect violates during a Write transaction the corresponding R5 Core will get an interrupt on the interrupt line R5FSSx_COREy_INTR_AHB_WRITE_ERR(#135). It will not take an Abort exception.