7.6.3 Interrupt Handling
PSC Interrupts
www.ti.com
Handle the PSC interrupts as described in the following procedure:
First, enable the interrupt.
1. Set the EMUIHB bit in PDCTLx, the EMUIHB bit in MDCTL[x], and / or the EMURSTIE bit in MDCTL[x]
to enable the interrupt events that you want.
Note:
There is no enable bit for the external power control pending interrupt event, so effectively
this event is always enabled. The PSC interrupt is sent to the ARM interrupt controller when
at least one enabled event becomes active.
2. Enable the ARM’s power and sleep controller interrupt (PSCINT) in the ARM interrupt controller. To
interrupt the ARM, PSCINT must be enabled in the ARM interrupt controller. See
for more
information.
The ARM enters the interrupt service routine (ISR) when it receives the interrupt.
1. Read the Px bit in PERRPR, the Mx bit in MERRPR0, the Mx bit in MERRPR1, and / or the EP bit in
EPCPR to determine the source of the interrupt(s).
2. For each active event that you want to service:
•
Read the event status bits in PDSTATx and MDSTAT[x], depending on the status bits read in the
previous step to determine the event that caused the interrupt.
•
Service the interrupt as required by your application
•
Write the Mx bit in MERRCRx, the Mx bit in PERRCRx, and the EPx bit in EPCCR to clear
corresponding status.
•
Set the ALLEV bit in INTEVAL. Setting this bit reasserts the PSCINT to the ARM’s interrupt
controller, if there are still any active interrupt events.
70
Power and Sleep Controller
SPRUFX7 – July 2008