SLAU320AJ July 2010 – May 2021
static word IR_Shift (byte Instruction) | |||
Shifts a new instruction into the JTAG instruction register through TDI. (The instruction is shifted in MSB first; the MSB is interpreted by the JTAG instruction register as the LSB.) | |||
Arguments: | byte Instruction (8-bit JTAG instruction) | ||
Result: | word TDOword (value shifted out on TDO = JTAG_ID) |
static word DR_Shift16 (word Data) | |||
Shifts a given 16-bit word into the JTAG data register through TDI (data shift MSB first) | |||
Arguments: | word data (16-bit data value) | ||
Result: | word (value shifted out simultaneously on TDO) |
static void ResetTAP (void) | |||
Performs fuse-blow check, resets the JTAG interface, and sends the JTAG state machine (TAP controller) to the Run-Test/Idle state | |||
Arguments: | None | ||
Result: | None |
static word ExecutePOR (void) | |||
Executes a power-up clear command through the JTAG control signal register. This function also disables the target device's watchdog timer to avoid an automatic reset condition. | |||
Arguments: | None | ||
Result: | word (STATUS_OK if the queried JTAG ID is valid, STATUS_ERROR otherwise) |
static word SetInstrFetch (void) | |||
Sends the target device's CPU into the instruction fetch state | |||
Arguments: | None | ||
Result: | word (STATUS_OK if instruction-fetch state is set, STATUS_ERROR otherwise) |
static void SetPC (word Addr) | |||
Loads the target device CPU's program counter (PC) with the desired 16-bit address | |||
Arguments: | word Addr (desired 16-bit PC value) | ||
Result: | None |
static void HaltCPU (void) | |||
Sends the target CPU into a controlled, stopped state | |||
Arguments: | None | ||
Result: | None |
static void ReleaseCPU (void) | |||
Releases the target device's CPU from the controlled, stopped state. (Does not release the target device from JTAG control. See ReleaseDevice.) | |||
Arguments: | None | ||
Result: | None |
word VerifyPSA (word StartAddr, word Length, word *DataArray) | |||
Compares the computed pseudo signature analysis (PSA) value to the PSA value shifted out from the target device. It can be used for very fast data block or erasure verification (called by the EraseCheck and VerifyMem prototypes discussed previously). | |||
Arguments: | word StartAddr (start address of the memory data block to be checked) | ||
word Length (number of words within the data block) | |||
word *DataArray (pointer to an array containing the data, 0 for erase check) | |||
Result: | word (STATUS_OK if comparison was successful, STATUS_ERROR otherwise) |
For MSP430X and MSP430Xv2 architecture devices, the following function is defined:
static unsigned long DR_Shift20(unsigned long address) | |||
Shifts a given 20-bit address word into the JTAG data register through TDI (data shift MSB first) | |||
Arguments: | long address (20-bit address word) | ||
Result: | long TDO value |
For MSP430Xv2 architecture devices, the following functions are defined:
word GetCoreipIdXv2() | |||
Determines and compares core identification info (Xv2) | |||
Arguments: | None | ||
Result: | word (STATUS_OK if correct JTAG ID was returned, STATUS_ERROR otherwise) |
void jResetJtagTap(void) | |||
Resets target JTAG interface and perform fuse-HW check | |||
Arguments: | None | ||
Result: | None |
void StartJtagJSbw(byte states) | |||
Starts JTAG communication in JSBW mode | |||
Arguments: | byte states (reset state) | ||
Result: | None |
void jRelease(void) | |||
Releases the JSBW logic | |||
Arguments: | None | ||
Result: | None |
long jsbw_Shift(word Format, long Data) | |||
Shifts a value into TDI (MSB first) and simultaneously shift out a value from TDO (MSB first) | |||
Arguments: | word Format (number of bits shifted, 8 (F_BYTE), 16 (F_WORD), 20 (F_ADDR) or 32 (F_LONG)) | ||
long Data (data to be shifted into TDI) | |||
Result: | unsigned long (scanned TDO value) |
long jsbw_IR_Shift(byte instruction) | |||
Shifts a new instruction into the JTAG instruction register through JSBW (MSB first, but with interchanged MSB - LSB, to simply use the same shifting function Shift()). | |||
Arguments: | instruction (8 bit JTAG instruction) | ||
Result: | word (TDOword - value shifted out from TDO: JTAG identification) |
long jsbw_DR_Shift(long data) | |||
Shifts data into the JTAG data register through JSBW (MSB first, but with interchanged MSB - LSB, to simply use the same shifting function Shift()). | |||
Arguments: | long data | ||
Result: | word (TDOword - value shifted out from TDO: JTAG identification) |
void JsbwMagicPattern(void) | |||
Applies the magic pattern through JSBW | |||
Arguments: | None | ||
Result: | None |
void jsbwJtagUnlock(void) | |||
Resets the JTAG lock through JSBW | |||
Arguments: | None | ||
Result: | None |