The ESM instance must beinitializedwith the following sequence. This initialization
will allow the application to specify for each event whether the interrupt is
enabled or disabled, the priority of the event, and whether the nErrorPin assertion
is enabled or disabled for the event. This needs to be done only once. All the
required ESM events can be initialized at the same time.
For more information on the ESM, refer
to Section 12.10.2.
To initialize the ESM module for a specified instance:
- Clear all raw status and enable bits by setting ESM_SFT_RST Register bits
[3:0] to 0Fh, to reset the ESM
- Write 0x1 to the appropriate bits in the ESM_ERR_STS register. This step
will clear the configuration interrupt raw status
- Write 0x1 to the appropriate
bits in the ESM_ERR_EN_SET register, to n enable the configuration error
interrupt as described in Section 12.10.2.3.1.1.
- Write 0x1 to the appropriate bits in the error group j of the ESM_STS_j
register. This step will clear the level interrupt raw status.
- Write 0x1 to the appropriate bits in the error group j of the
ESM_INTR_EN_SET_j register, to enable the level error interrupt.
- Write 0x1 to the appropriate bits in the error group j of the ESM_INT_PRIO_j
register, to indicate which interrupt the corresponding event influences (if
enabled) for event group j.
- If required, write 0x1 to the appropriate bits in the error group j of the
ESM_PIN_EN_SET_j register, to set error output corresponding to the desired
events.
- Enable the global interrupts by setting ESM_EN Register bits [3:0] to
0Fh