68 typedef unsigned short word;
69 typedef unsigned char byte;
85 #define IR_CNTRL_SIG_16BIT 0xC8 // original value: 0x13
86 #define IR_CNTRL_SIG_CAPTURE 0x28 // original value: 0x14
88 #define IR_CNTRL_SIG_RELEASE 0xA8 // original value: 0x15
93 #define IR_PREPARE_BLOW 0x44 // original value: 0x22
94 #define IR_EX_BLOW 0x24 // original value: 0x24
100 #define IR_DATA_16BIT 0x82 // original value: 0x41
101 #define IR_DATA_QUICK 0xC2 // original value: 0x43
106 #define IR_DATA_PSA 0x22 // original value: 0x44
107 #define IR_SHIFT_OUT_PSA 0x62 // original value: 0x46
113 #define IR_ADDR_16BIT 0xC1 // original value: 0x83
114 #define IR_ADDR_CAPTURE 0x21 // original value: 0x84
116 #define IR_DATA_TO_ADDR 0xA1 // original value: 0x85
119 #define IR_BYPASS 0xFF // original value: 0xFF
129 #define V_RESET 0xFFFE
133 #define VPP_ON_TEST 1
140 static word DR_Shift16(word Data);
141 static unsigned long DR_Shift20(
unsigned long address);
142 static word IR_Shift(byte Instruction);
143 static void ResetTAP(
void);
144 static word ExecutePOR_430X(
void);
145 static word SetInstrFetch(
void);
146 static void SetPC_430X(
unsigned long Addr);
147 static void HaltCPU(
void);
148 static void ReleaseCPU(
void);
149 word
VerifyPSA_430X(
unsigned long StartAddr,
unsigned long Length, word *DataArray);
153 #define GetDevice GetDevice_430X
155 #define ReleaseDevice ReleaseDevice_430X
156 void WriteMem_430X(word Format,
unsigned long Addr, word Data);
157 #define WriteMem WriteMem_430X
158 void WriteMemQuick_430X(
unsigned long StartAddr,
unsigned long Length, word *DataArray);
159 #define WriteMemQuick WriteMemQuick_430X
160 void WriteFLASH_430X(
unsigned long StartAddr,
unsigned long Length, word *DataArray);
161 #define WriteFLASH WriteFLASH_430X
162 word
WriteFLASHallSections_430X(
const unsigned int *data,
const unsigned long *address,
const unsigned long *length_of_sections,
const unsigned long sections);
163 #define WriteFLASHallSections WriteFLASHallSections_430X
165 #define ReadMem ReadMem_430X
166 void ReadMemQuick_430X(
unsigned long StartAddr,
unsigned long Length, word *DataArray);
167 #define ReadMemQuick ReadMemQuick_430X
169 #define EraseFLASH EraseFLASH_430X
171 #define EraseCheck EraseCheck_430X
172 word
VerifyMem_430X(
unsigned long StartAddr,
unsigned long Length, word *DataArray);
173 #define VerifyMem VerifyMem_430X
183 static unsigned short SegmentInfoAKey = 0xA500;
word VerifyPSA_430X(unsigned long StartAddr, unsigned long Length, word *DataArray)
This function compares the computed PSA (Pseudo Signature Analysis) value to the PSA value shifted ou...
void ReadMemQuick_430X(unsigned long StartAddr, unsigned long Length, word *DataArray)
This function reads an array of words from the memory.
void ReleaseDevice_430X(unsigned long Addr)
Function to release the target device from JTAG control.
void WriteMem_430X(word Format, unsigned long Addr, word Data)
This function writes one byte/word at a given address ( <0xA00)
word ReadMem_430X(word Format, unsigned long Addr)
This function reads one byte/word from a given address in memory.
word VerifyMem_430X(unsigned long StartAddr, unsigned long Length, word *DataArray)
This function performs a Verification over the given memory range.
word WriteFLASHallSections_430X(const unsigned int *data, const unsigned long *address, const unsigned long *length_of_sections, const unsigned long sections)
This function programs/verifies a set of data arrays of words into a FLASH memory by using the "Write...
word IsFuseBlown(void)
This function checks if the JTAG access security fuse is blown.
void EraseFLASH_430X(word EraseMode, unsigned long EraseAddr)
This function performs a mass erase (with and w/o info memory) or a segment erase of a FLASH module s...
word GetDevice_430X(void)
Function to take target device under JTAG control. Disables the target watchdog. Sets the global DEVI...
void UnlockInfoA(void)
This function unlocks segment A of the InfoMemory (Flash)
void WriteFLASH_430X(unsigned long StartAddr, unsigned long Length, word *DataArray)
This function programs/verifies an array of words into the FLASH memory by using the FLASH controller...
void WriteMemQuick_430X(unsigned long StartAddr, unsigned long Length, word *DataArray)
This function writes an array of words into the target memory.
word BlowFuse(void)
This function blows the security fuse.
word EraseCheck_430X(unsigned long StartAddr, unsigned long Length)
This function performs an Erase Check over the given memory range.
Configurations for the MSP430 Replicator X.