JTAG430 Application

This application is used for programming and debugging the MSP430 microcontroller families from Texas Instruments.

The pinout is standard for the MSP430 FET.

Clients

A simple client in Python is available in svn as `goodfet.msp430'.

Status

At presentl, only 4-wire JTAG of 16-bit MSP430 chips is supported. Support for Spy-Bi-Wire, MSP430X, and MSP430X2 is on the way. Flash memory routines are functional.

Development

Prior to any transaction, the SETUP (0x10) verb should be sent to the JTAG application to properly set the I/O pin directions. After that, the START (0x20) and STOP (0x21) verbs may be used to enter and exit the TAP. HALTCPU (0xA0) and RELEASECPU (0xA1) should be used to stop the CPU during memory accesses, releasing afterward.

All reads and writes are word-sized (16-bit), except for those at addresses beneath 0x100, which are performed as bytes. IR_SHIFT and DR_SHIFT are available for raw access to JTAG, but higher level functions are also implemented for convenience and speed.

Verbs

The following verbs are supported.

Hex#defineDescription
0x02PEEKRead word from memory at word[0].
0x03POKEWrite word[1] to memory at word[0]. (Not flash.)
0x10SETUPConfigure I/O pins.
0x20STARTBegin to debug by JTAG.
0x21STOPEnd JTAG debugging.
0x7ENOKNo Operation
0x80IR_SHIFTShift the IR.
0x81DR_SHIFTShift the DR.
0x91DR_SHIFT20Shift 20 bits of DR.
0xA0HALTCPUHalt the CPU.
0xA1RELEASECPUResume the CPU.
0xC1SETINSTRFETCHSet CPU to Instruction Fetch state.
0xC2SETPCSet the Program Counter.
0xD2GETREGRead register u8[0].
0xD3SETREGWrite u16[1] to register u8[0].
0xE0WRITEMEMAlias for POKE.
0xE1WRITEFLASHWrite a word of flash memory.
0xE2READMEMAlias for PEEK.
0xE3ERASEFLASHMass Erase
0xE8ERASEINFOInfo Erase
0xF0COREIP_ID
0xF1DEVICE_ID

WRITEMEM and WRITEFLASH read and return the written value. Client implementations should throw an error during programming if the returned value does not match the written value. Insufficient writes commonly leave 0xA100.