
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
15 / 153
2.16.3 Software interrupt
Software interrupt routine address: this address (defined in the
Sw_interrupt_routine_addr (10Eh and 12Eh) section) is selected as the new uPC value
if a software interrupt request is received by the microcore. This condition has a higher
priority than any instruction.
Table 21. Software interrupt Instructions
Software interrupt request
Enable/disable software interrupt
Return from interrupt
2.17 Counter/timers
This block contains 4 pairs of 16-bit up counter and 16-bit end-of-count registers. Each
of the four counters is compared with an eoc_reg (end-of-count register); if the counter
is greater or equal than its corresponding end-of-count, then a terminal count signal is
asserted. These signals are fed to uinstruction_rom.
At reset each counter and eoc_reg is set to zero. When a counter reaches its end-of-
count value, its value does not increase. If the eoc_reg is changed without resetting the
counter value, the counter value starts to increase again (if the new end-of-count value is
greater than the counter value) until the new end-of-count value is reached.
These counters can be loaded with data coming from the DRAM or from the internal
bus (e.g. ALU registers). Also, the counters can write data into the DRAM or into any of
the registers connected to the internal bus (this function can be used to perform period
measurements on the input signals).
It is possible to update any terminal count register without stopping the associated
counter. This feature allows on-the-fly data correction in the actuated timings. All load
instructions executed can simultaneously load the eoc_reg with the value specified in the
microinstruction and reset the counter.
The counter starts counting up until it meets the eoc_reg value: at this point an eoc (end-
of-count) signal is set to inform the microprogram that this event has occurred. There are
also load instructions that do not reset the counter after loading the eoc_reg register. See
for details of all the instructions.
Counter 1 and 2 always operate with the ck execution clock: so the maximum time
that is possible to measure with a single counter is 2
16
* ck clock period (10,923 ms
at 6.0 MHz). Counter 3 and 4 can operate with a slower clock, obtained dividing the
execution clock frequency (by an integer factor from 1 to 12, 14, 16, 32, or 64), to
measure longer times with lower resolution (refer to register Counter_34_prescaler (111h
and 131h).
Table 22. Load counter and set output instructions
Load counter from ALU register and set outputs
Load counter from Data RAM and set outputs
2.18 SPI back door
All the SPI accessible registers can be accessed also by the microcores through an
"SPI back door". Note that both Data and Code RAMs are unavailable through the back