projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JTAG430X2 works at 16MHz, not at 3MHz.
[goodfet]
/
firmware
/
include
/
jtag.h
diff --git
a/firmware/include/jtag.h
b/firmware/include/jtag.h
index
1551d79
..
c1abdf3
100644
(file)
--- a/
firmware/include/jtag.h
+++ b/
firmware/include/jtag.h
@@
-4,8
+4,18
@@
#include <iomacros.h>
#include <iomacros.h>
+extern unsigned int drwidth;
+
+#define MSP430MODE 0
+#define MSP430XMODE 1
+#define MSP430X2MODE 2
+extern unsigned int jtag430mode;
+
// Generic Commands
// Generic Commands
+//! Shift n bytes.
+unsigned long jtagtransn(unsigned long word,
+ unsigned int bitcount);
//! Shift 8 bits of the IR.
unsigned char jtag_ir_shift8(unsigned char);
//! Shift 16 bits of the DR.
//! Shift 8 bits of the IR.
unsigned char jtag_ir_shift8(unsigned char);
//! Shift 16 bits of the DR.
@@
-22,6
+32,9
@@
void jtag430_start();
//! Reset the TAP state machine, check the fuse.
void jtag430_resettap();
//! Reset the TAP state machine, check the fuse.
void jtag430_resettap();
+//! Defined in jtag430asm.S
+void jtag430_tclk_flashpulses(int);
+
//High-level Macros follow
//! Write data to address.
void jtag430_writemem(unsigned int adr, unsigned int data);
//High-level Macros follow
//! Write data to address.
void jtag430_writemem(unsigned int adr, unsigned int data);
@@
-84,7
+97,8
@@
extern int savedtclk;
#define SAVETCLK savedtclk=P5OUT&TCLK;
#define RESTORETCLK if(savedtclk) P5OUT|=TCLK; else P5OUT&=~TCLK
#define SAVETCLK savedtclk=P5OUT&TCLK;
#define RESTORETCLK if(savedtclk) P5OUT|=TCLK; else P5OUT&=~TCLK
-//JTAG commands, bit-swapped
+
+//16-bit MSP430 JTAG commands, bit-swapped
#define IR_CNTRL_SIG_16BIT 0xC8 // 0x13
#define IR_CNTRL_SIG_CAPTURE 0x28 // 0x14
#define IR_CNTRL_SIG_RELEASE 0xA8 // 0x15
#define IR_CNTRL_SIG_16BIT 0xC8 // 0x13
#define IR_CNTRL_SIG_CAPTURE 0x28 // 0x14
#define IR_CNTRL_SIG_RELEASE 0xA8 // 0x15