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
6 / 153
•
Subroutine execution
•
Wait states
2.4.2 Auxiliary register
This 10-bit register is used to manage the one-level subroutine return or as an auxiliary
memory element.
Any time the system executes a "jump to subroutine" instruction, the uPC is automatically
stored in the auxiliary register before jumping to the subroutine start address. When the
subroutine execution ends, the incremented auxiliary register content is transferred back
to the uPC.
2.5 Wait instructions
The PT2001 is an event/response machine. An event occurs and then code executes,
the wait instructions are the key to this behavior. The core waits at a 'wait' instruction for
an event to occur.
These pending events are configured as rows in a six-row wait table. Before the
wait instruction is issued, the wait table has to be configured with the
instructions to obtain the desired behavior. One instruction is required for each wait entry
to be configured.
Although there are many possible event sources which can be configured inside the six
row wait table:
•
terminal_counts: any of the four terminal count (tc1, tc2, tc3, and tc4) signals can be
checked to detect if any of the four counters has reached its end-of-count position.
•
Flags: checks the value (both polarities) of one of the 16 flag signals available.
•
Shortcut feedback: the voltage feedback (both polarities) related to the three shortcut
outputs.
•
gen_start: checks the value (both polarities) of the filtered chx_start input signal to
define when to start and finish an actuation.
•
current_feedback: the value (both polarities) of the six current feedbacks.
•
own_current_feedback: the value (both polarities) of the own current feedbacks. This
feedback can be different for each microcore and can be changed with the microcode
instruction dfcsct.
Table 2 "Current feedback assignment"
shows the configuration after
reset.
Table 2. Current feedback assignment
Microcore
Own current feedback (reset value)
Uc0,channel 1
current feedback 1
Uc1,channel 1
current feedback 2
Uc0,channel 2
current feedback 3
Uc1,channel 2
current feedback 4
•
vboost: the output (both polarities) of the comparator that measures the boost voltage.
op_done: check if a previously issued ALU operation is still in progress or it is completed.
This is mandatory for multiple cycle instructions (like mul, muli and possibly sh32r, sh32l,
shl, shr, shls, shrs, sh32ri, sh32li, shli, shri, shlsi, shrsi, depending on how many shift
positions are required)