
NXP Semiconductors
PT2001SWUG
PT2001 programming guide and instruction set
PT2001SWUG
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2019. All rights reserved.
User guide
Rev. 3.0 — 29 April 2019
14 / 153
2.16 Interrupts
An interrupt routine is executed when an interrupt request is received by the microcore.
The microcore must not have already been executing another interrupt routine. The
interrupt routine cannot be interrupted by any other interrupt, but only be terminated via
an iret instruction or (if configured in this way by the iconf instruction) by reading the
related diagnosis register through SPI (not through the SPI back door):
•
Err_ucXchY registers (162h to 169h) for the automatic diagnosis interrupt
•
Driver_status register (1D2h) for the disabled drivers interrupt.
The interrupts received are queued while another interrupt execution is ongoing. When
exiting the ongoing interrupt routine with the iret instruction, the queue can be cleared
and queued interrupts are ignored. Otherwise, the queued interrupts are executed
according to their priorities:
•
Automatic diagnosis interrupt (higher priority)
•
Driver disabled interrupt
•
Software interrupt (lower priority)
The interrupt return address is always calculated when the interrupt occurs, and is
stored in the Ucx_irq_status registers (10Fh, 110h, 12Fh, 130h). The return address
is the address where the code execution was interrupted. If a wait or a conditional
jump instruction is interrupted, the return address is defined, restoring the status of the
feedback at the moment the interrupt request occurred.
2.16.1 Automatic interrupt
Automatic diagnosis interrupt routine address: this address (defined in the
Diag_routine_addr (10Ch and 12Ch) section) is selected as the new uPC value if an
automatic diagnosis interrupt request is received by the microcore. This condition has an
higher priority than any instruction and any other interrupt.
The following instructions are used to enable or disable the automatic diagnostics and
select different configuration.
Before turning ON the diagnostics, the error table needs to be configured properly by the
SPI (refer to registers HSx_output_config (153h to 161h) and LSx_output_config (140h
to 152h)). The threshold can be configured either by the SPI (refer to registers V
DS
and
V
SRC
threshold section in the data sheet) or by using the
instruction.
Table 20. Automatic diagnostics instructions
Change V
DS
and V
SRC
threshold
Enable automatic diagnosis
Enable all automatic diagnosis
Enable automatic diagnosis shortcuts
Select HS2/4/6 feedback reference
2.16.2 Driver disable interrupt
Driver disabled interrupt routine address: this address (defined in the
Driver_disabled_routine_addr (10Dh and 12Dh) section) is selected as the new uPC
value if an interrupt request, due to disabled drivers, is received by the microcore. This
condition has an higher priority than any instruction and the software interrupt.