SLAU320AJ July 2010 – May 2021
To read from any memory address location (peripherals, RAM, or flash/FRAM), the R/W signal must be set to READ using the JTAG control signal register (bit 0 set to 1). The MSP430 MAB must be set to the specific address to be read using the IR_ADDR_16BIT instruction while TCLK is 0. To capture the corresponding value of the MSP430 MDB, the IR_DATA_TO_ADDR instruction must be executed. After the next rising edge of TCLK, the data of this address is present on the MDB. The MDB can now be captured and read out from the TDO pin using a 16-bit JTAG data access. When TCLK is set low again, the address of the next memory location to be read can be applied to the target MAB. Following is the flow required to read data from any memory address of a target device. Implementations for both the MSP430 and MSP430X architectures are shown.
Set CPU to stopped state (HaltCPU) | |||
ClrTCLK |
|||
IR_SHIFT("IR_CNTRL_SIG_16BIT") |
|||
DR_SHIFT16(0x2409) |
: Read one word from memory. To read a byte, the value to shift is 0x2419. |
||
IR_SHIFT("IR_ADDR_16BIT") |
Yes | ||
DR_SHIFT16("Address") |
: Set desired address |
||
IR_SHIFT("IR_DATA_TO_ADDR") |
|||
SetTCLK |
|||
ClrTCLK |
|||
DR_SHIFT16(0x0000) |
: Memory value shifted out on TDO |
||
Read again? | |||
No | |||
ReleaseCPU should now be executed, returning the CPU to normal operation. |
Set CPU to stopped state (HaltCPU) | |||
ClrTCLK |
|||
IR_SHIFT("IR_CNTRL_SIG_16BIT") |
|||
DR_SHIFT16(0x2409) |
: Read one word from memory. To read a byte, the value to shift is 0x2419. |
||
IR_SHIFT("IR_ADDR_16BIT") |
Yes | ||
DR_SHIFT20("Address") |
: Set desired address |
||
IR_SHIFT("IR_DATA_TO_ADDR") |
|||
SetTCLK |
|||
ClrTCLK |
|||
DR_SHIFT16(0x0000) |
: Memory value shifted out on TDO |
||
Read again? | |||
No | |||
ReleaseCPU should now be executed, returning the CPU to normal operation. |
CPU must be in the Full-Emulation-State before the following sequence. | |||
ClrTCLK |
Yes | ||
IR_SHIFT("IR_CNTRL_SIG_16BIT") |
|||
DR_SHIFT16(0x0501) |
: Read one word from memory. To read a byte, the value to shift is 0x0511. |
||
IR_SHIFT("IR_ADDR_16BIT") |
|||
DR_SHIFT20("Address") |
: Set desired address |
||
IR_SHIFT("IR_DATA_TO_ADDR") |
|||
SetTCLK |
|||
ClrTCLK |
|||
DR_SHIFT16(0x0000) |
: Memory value shifted out on TDO |
||
SetTCLK |
|||
ClrTCLK |
|||
SetTCLK |
|||
Read again? | |||
No | |||
CPU is now again in Full-Emulation-State. |