projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New Chipcon SPI name.
[goodfet]
/
firmware
/
include
/
jtag.h
diff --git
a/firmware/include/jtag.h
b/firmware/include/jtag.h
index
5dd5675
..
432c23d
100644
(file)
--- a/
firmware/include/jtag.h
+++ b/
firmware/include/jtag.h
@@
-3,6
+3,9
@@
\brief JTAG handler functions.
*/
\brief JTAG handler functions.
*/
+#ifndef JTAG_H
+#define JTAG_H
+
#include <signal.h>
#include <io.h>
#include <iomacros.h>
#include <signal.h>
#include <io.h>
#include <iomacros.h>
@@
-20,6
+23,8
@@
extern unsigned int jtag430mode;
//! Shift n bytes.
unsigned long jtagtransn(unsigned long word,
unsigned int bitcount);
//! 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.
//! Shift 8 bits of the IR.
unsigned char jtag_ir_shift8(unsigned char);
//! Shift 16 bits of the DR.
@@
-104,8
+109,12
@@
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
+//Replace every "CLRTCK SETTCK" with this.
+#define TCKTOCK CLRTCK,SETTCK
+
//16-bit MSP430 JTAG commands, bit-swapped
//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
#define IR_CNTRL_SIG_16BIT 0xC8 // 0x13
#define IR_CNTRL_SIG_CAPTURE 0x28 // 0x14
#define IR_CNTRL_SIG_RELEASE 0xA8 // 0x15
@@
-138,3
+147,16
@@
extern int savedtclk;
unsigned int jtag430x2_syncpor();
//! Executes an MSP430X2 POR
unsigned int jtag430x2_por();
unsigned int jtag430x2_syncpor();
//! Executes an MSP430X2 POR
unsigned int jtag430x2_por();
+//! Power-On Reset
+void jtag430_por();
+
+//JTAG commands
+#define JTAG_IR_SHIFT 0x80
+#define JTAG_DR_SHIFT 0x81
+#define JTAG_DR_SHIFT20 0x91
+
+
+//JTAG430 commands
+#include "jtag430.h"
+
+#endif