X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Finclude%2Fjtag.h;h=8cb0fdbc942057f9a49be79f13ca898e7842f43d;hp=1ef3b79b967898f1b8e13fae9a9093bf736de520;hb=b0274fc1ffccf73492660c02600e8df12c0ba5b2;hpb=eddb0eb08f187dc156a6cb51878104df67d97436 diff --git a/firmware/include/jtag.h b/firmware/include/jtag.h index 1ef3b79..8cb0fdb 100644 --- a/firmware/include/jtag.h +++ b/firmware/include/jtag.h @@ -20,6 +20,8 @@ extern unsigned int jtag430mode; //! Shift n bytes. unsigned long jtagtransn(unsigned long word, unsigned int bitcount); +//! Shift the address width. +unsigned long jtag_dr_shiftadr(unsigned long in); //! Shift 8 bits of the IR. unsigned char jtag_ir_shift8(unsigned char); //! Shift 16 bits of the DR. @@ -104,8 +106,12 @@ extern int savedtclk; #define SAVETCLK savedtclk=P5OUT&TCLK; #define RESTORETCLK if(savedtclk) P5OUT|=TCLK; else P5OUT&=~TCLK +//Replace every "CLRTCK SETTCK" with this. +#define TCKTOCK CLRTCK,SETTCK + //16-bit MSP430 JTAG commands, bit-swapped +//Rewrite these with MSP430 prefix. #define IR_CNTRL_SIG_16BIT 0xC8 // 0x13 #define IR_CNTRL_SIG_CAPTURE 0x28 // 0x14 #define IR_CNTRL_SIG_RELEASE 0xA8 // 0x15 @@ -152,6 +158,8 @@ void jtag430_por(); #define JTAG430_RELEASECPU 0xA1 #define JTAG430_SETINSTRFETCH 0xC1 #define JTAG430_SETPC 0xC2 +#define JTAG430_SETREG 0xD2 +#define JTAG430_GETREG 0xD3 #define JTAG430_WRITEMEM 0xE0 #define JTAG430_WRITEFLASH 0xE1 #define JTAG430_READMEM 0xE2