AURIX™ MCU: How to find out which SMU alarms are triggered – KBA236294
Community Translation: AURIX™ MCU: トリガーされたSMUアラームを確認する方法 – KBA236294
If a safety mechanism raises an alarm, for example the ALMx[y], then the corresponding bit of the alarm status AGx[y] register is set as shown in Figure 1. This happens even if there is no reaction configured for a particular alarm.
The application software can then perform a read access to the AGx register(s) to find out which alarms are triggered. The AGx register(s) can be accessed in both supervisor mode (SV) and user mode (U).
Note: For any bit ‘y’ of the alarm status AGx[y] register, if the bit is already set and the corresponding alarm is raised again, the configured alarm reaction (if any) is not processed. Therefore, after an alarm reaction is executed, the application software must clear the corresponding alarm status bits of the AGx register(s).
Figure 1 Safety Management Unit (SMU) core
The alarm status AGx[y] register is cleared with an application reset or higher reset event, that is system reset or power-on reset. Therefore, if the reaction to an alarm leads to a reset of the MCU, it is not possible to find out which one it was by reading the AGx register(s). For this purpose, the alarm diagnosis ADx[y] registers are available as shown in Figure 1. These can be useful to implement recovery strategies, if allowed by the application, or during debugging. The ADx register copies the contents of the AGx register if either one of the following conditions are met:
- The alarm reaction SMU_RESET is triggered if the SMU state machine (SSM) is in the RUN or FAULT state.
- The FSP protocol is triggered by an alarm or by software. These are the valid conditions for a transition of the SSM to the FAULT state.
Note: Upon fulfillment of the previous conditions, the ADx registers take a snapshot of the AGx registers overwriting whatever the values were already in the ADx bifields.
Note: This KBA applies to the following series of AURIX™ MCUs:
- AURIX™ TC3xx series