This application is used for programming and debugging the MSP430 microcontroller families from Texas Instruments.
The pinout is standard for the MSP430 FET.
A simple client in Python is available in svn as `goodfet.msp430'.
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.
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.
The following verbs are supported.
|0x02||PEEK||Read word from memory at word.|
|0x03||POKE||Write word to memory at word. (Not flash.)|
|0x10||SETUP||Configure I/O pins.|
|0x20||START||Begin to debug by JTAG.|
|0x21||STOP||End JTAG debugging.|
|0x80||IR_SHIFT||Shift the IR.|
|0x81||DR_SHIFT||Shift the DR.|
|0x91||DR_SHIFT20||Shift 20 bits of DR.|
|0xA0||HALTCPU||Halt the CPU.|
|0xA1||RELEASECPU||Resume the CPU.|
|0xC1||SETINSTRFETCH||Set CPU to Instruction Fetch state.|
|0xC2||SETPC||Set the Program Counter.|
|0xD2||GETREG||Read register u8.|
|0xD3||SETREG||Write u16 to register u8.|
|0xE0||WRITEMEM||Alias for POKE.|
|0xE1||WRITEFLASH||Write a word of flash memory.|
|0xE2||READMEM||Alias for PEEK.|
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.