29.4.4 Step Queue Pointer

The PTG Step Queue Pointer register (PTGQPTR) addresses the currently active step command in the step queue. While the PTG is not executing step commands (PTGSTRT = 0), any value can be written to PTGQPTR regardless of the state of the ON bit. Once the PTGSTRT bit is set, the PTG begins executing step commands at the queue location indicated by PTGQPTR, and the register becomes read-only. When the PTG is disabled, the PTGQPTR register is cleared once on transition of the ON bit from ‘1’ to ‘0’, after which PTGQPTR becomes writeable again.

The user can read the PTGQPTR register at any time. In the Disabled state (ON = 0) and Idle state (ON = 1 and PTGSTRT = 0), a read returns the index of the first step command to execute. In the Active state (ON = 1 and PTGSTRT = 1), a read returns the index of the currently executing step command. The PTGQPTR register is typically incremented during the first cycle of each command. The exceptions to this rule are:
  • If the PTGJMP command is executed: The Step Queue Pointer is loaded with the target queue address.
  • If the PTGJMPCx command is executed and PTGCx is less than PTGCxLIM: The Step Queue Pointer is loaded with the target queue address.
  • If PTGQPTR points to the last step command in PTGQUEn: The Step Queue Pointer will roll over to ‘0’.