SLAU320AJ July 2010 – May 2021
Reference function: HaltCPU/ReleaseCPU
While a memory location is accessed by the JTAG interface, the target device's CPU should be taken into a defined halt state. Stopping of the CPU is supported by the HALT_JTAG bit (bit 3) in the JTAG control signal register, which is set to 1 with execution of the HaltCPU function. After accessing the required memory locations, the CPU can be returned to normal operation. This function is implemented by the ReleaseCPU prototype and simply resets the HALT_JTAG bit.
CPU must be in the instruction-fetch state before the following sequence | |||
HaltCPU | IR_SHIFT("IR_DATA_16BIT") | ||
DR_SHIFT16(0x3FFF) : "JMP $" instruction to keep CPU from changing the state | |||
ClrTCLK | |||
IR_SHIFT("IR_CNTRL_SIG_16BIT") | |||
DR_SHIFT16(0x2409) : set HALT_JTAG bit | |||
SetTCLK | |||
Now the CPU is in a controlled state and is not altered during memory accesses. Note: Do not reset the HALT_JTAG bit (= 0) while accessing the target memory. | |||
Memory Access Performed Here | |||
The CPU is switched back to normal operation using ReleaseCPU. | |||
ReleaseCPU | ClrTCLK | ||
IR_SHIFT("IR_CNTRL_SIG_16BIT") | |||
DR_SHIFT16(0x2401) : Clear HALT_JTAG bit | |||
IR_SHIFT("IR_ADDR_CAPTURE") | |||
SetTCLK | |||
The CPU is now in the instruction-fetch state and ready to receive a new JTAG instruction. If the PC has been changed while the memory was being accessed, the PC must be loaded with the correct address. |