
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
7 / 153
Table 3. Wait instructions
Create wait table entry far
Create wait table entry relative
Wait until condition satisfied
2.6 Subroutine instructions
This section covers the instructions that support calling and returning from subroutines.
As explained in the CRAM addressing mode, the jump to subroutine can be relative if the
destination address is in a range from "current_address - 16" to "current_a15".
If not, instruction jump far to subroutine needs to be used. When a subroutine instruction
is set, the program counter (pc) is saved in the auxiliary register 'aux'. The rfs instruction
"return from subroutine" causes the program counter to jump back to the main program.
Table 4. Subroutine instructions
Jump far to subroutine
Jump relative to subroutine
Return from subroutine
2.7 Program flow (jump, Ldjr) instructions
Conditions to be checked by the jump instructions are the same as the wait instruction
with the addition of the following inputs:
•
ctrl_reg: checks the value (both polarities) of one of the 16 control bits available in the
ctrl_reg register (see register 101h, 102h, 121h,122h).
•
status_bits: checks the value (both polarities) of one of the 16 control bits available in
the Status_bits register (see register 105h, 106h, 125h, 126h).
•
voltage feedback: the voltage feedback (both polarities) related to all the outputs.
•
start_latch: checks the value of the six bit start_latch.
•
arithmetic_register: checks the value (high polarity only) of one of the bits of the ALU
Section 2.2 "Arithmetic logic unit"
•
microcore_id: check if the microcore currently executing is uc0 or uc1
Same as the wait table, it is possible to jump far or jump relative. The following
instructions need to be used to define the destination address when a jump far is
required.
Table 5. Load jump registers instructions
Load jump register 1
Load jump register 2
defines the list of different jump instructions which are triggered.
Table 6. Jump instructions
Jump far on arithmetic condition
Jump relative on arithmetic condition
Jump far on control register condition
Jump relative on control register condition