2 \author Travis Goodspeed <travis at radiantmachines.com>
4 This is an implementation of the MSP430X2 JTAG protocol
5 for the GoodFET project at http://goodfet.sf.net/
7 See the license file for details of proper use.
17 unsigned char jtag430x2_jtagid(){
19 return jtagid=jtag_ir_shift8(IR_BYPASS);
21 //! Start JTAG, take pins
22 unsigned char jtag430x2_start(){
26 //Known-good starting position.
27 //Might be unnecessary.
33 //Entry sequence from Page 67 of SLAU265A for 4-wire MSP430 JTAG
45 //Perform a reset and disable watchdog.
46 return jtag430x2_jtagid();
50 //! Handles classic MSP430 JTAG commands. Forwards others to JTAG.
51 void jtag430x2handle(unsigned char app,
58 do cmddata[0]=jtag430x2_start();
59 while(cmddata[0]==00 || cmddata[0]==0xFF);
61 //TAP setup, fuse check
66 case JTAG430_RELEASECPU:
67 case JTAG430_SETINSTRFETCH:
70 case JTAG430_WRITEMEM:
72 case JTAG430_WRITEFLASH:
73 case JTAG430_ERASEFLASH:
76 jtaghandle(app,verb,len);