![Texas Instruments AM1808 Technical Reference Manual Download Page 172](http://html.mh-extra.com/html/texas-instruments/am1808/am1808_technical-reference-manual_1094558172.webp)
PSC Interrupts
172
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Power and Sleep Controller (PSC)
See
for a description of the PSC registers.
8.5.3 Interrupt Handling
Handle the PSC interrupts as described in the following procedure:
First, enable the interrupt:
1. Set the EMUIHBIE bit in PDCTL
n
, the EMUIHBIE and the EMURSTIE bits in MDCTL
n
to enable the
interrupt events that you want.
NOTE:
The PSC interrupt is sent to the device interrupt controller when at least one enabled event
becomes active.
2. Enable the power sleep controller interrupt (PSC
n
_ALLINT) in the device interrupt controller. To
interrupt the CPU, PSC
n
_ALLINT must be enabled in the device interrupt controller. See the
ARM
Interrupt Controller (AINTC)
chapter for more information on interrupts.
The CPU enters the interrupt service routine (ISR) when it receives the interrupt.
1. Read the P[n] bit in PERRPR, and/or the M[n] bit in MERRPR0, the M[n] bit in MERRPR1, to
determine the source of the interrupt(s).
2. For each active event that you want to service:
(a) Read the event status bits in PDSTAT
n
and MDSTAT
n
, depending on the status bits read in the
previous step to determine the event that caused the interrupt.
(b) Service the interrupt as required by your application.
(c) Write the M[n] bit in MERRCR
n
and the P[n] bit in PERRCR to clear corresponding status.
(d) Set the ALLEV bit in INTEVAL. Setting this bit reasserts the PSC interrupt to the device interrupt
controller, if there are still any active interrupt events.