Functions | Variables
JSBW.c File Reference

Detailed Description

4-wire JTAG emulation using Spy-Bi-Wire for LPM5 wakeup of an MSP430 device

Definition in file JSBW.c.

#include "JTAGfunc430Xv2.h"
#include "LowLevelFunc430Xv2.h"
Include dependency graph for JSBW.c:

Go to the source code of this file.

Functions

void jRelease (void)
 Releases the JSBW logic. More...
 
void StartJtagJSbw (byte states)
 Start JTAG communication in JSBW mode. More...
 
void jResetJtagTap (void)
 Reset target JTAG interface and perform fuse-HW check. More...
 
long jsbw_Shift (word Format, long Data)
 Shift a value into TDI (MSB first) and simultaneously shift out a value from TDO (MSB first). More...
 
long jsbw_IR_Shift (byte instruction)
 Function for shifting 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()). More...
 
long jsbw_DR_Shift (long data)
 Function for shifting data into the JTAG data register through JSBW (MSB first, but with interchanged MSB - LSB, to simply use the same shifting function Shift()). More...
 
void JsbwMagicPattern (void)
 Function for applying the magic pattern via JSBW. More...
 
void jsbwJtagUnlock (void)
 Function for resetting the JTAG lock via JSBW. More...
 

Variables

byte tdo_bit
 Holds the value of TDO-bit. More...
 
byte TCLK_saved
 Holds the last value of TCLK before entering a JTAG sequence. More...
 

Function Documentation

void jRelease ( void  )

Releases the JSBW logic.

Definition at line 65 of file JSBW.c.

Here is the call graph for this function:

void jResetJtagTap ( void  )

Reset target JTAG interface and perform fuse-HW check.

Definition at line 154 of file JSBW.c.

long jsbw_DR_Shift ( long  data)

Function for shifting data into the JTAG data register through JSBW (MSB first, but with interchanged MSB - LSB, to simply use the same shifting function Shift()).

Parameters
data
Returns
word (TDOword - value shifted out from TDO: JTAG identification)

Definition at line 249 of file JSBW.c.

Here is the call graph for this function:

long jsbw_IR_Shift ( byte  instruction)

Function for shifting 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()).

Parameters
instruction(8 bit JTAG instruction)
Returns
word (TDOword - value shifted out from TDO: JTAG identification)

Definition at line 229 of file JSBW.c.

Here is the call graph for this function:

long jsbw_Shift ( word  Format,
long  Data 
)

Shift a value into TDI (MSB first) and simultaneously shift out a value from TDO (MSB first).

Parameters
wordFormat (number of bits shifted, 8 (F_BYTE), 16 (F_WORD), 20 (F_ADDR) or 32 (F_LONG))
longData (data to be shifted into TDI)
Returns
unsigned long (scanned TDO value)

Definition at line 173 of file JSBW.c.

void jsbwJtagUnlock ( void  )

Function for resetting the JTAG lock via JSBW.

Definition at line 283 of file JSBW.c.

Here is the call graph for this function:

void JsbwMagicPattern ( void  )

Function for applying the magic pattern via JSBW.

Definition at line 271 of file JSBW.c.

Here is the call graph for this function:

void StartJtagJSbw ( byte  states)

Start JTAG communication in JSBW mode.

Parameters
bytestates (reset state)

Definition at line 79 of file JSBW.c.

Here is the call graph for this function:

Variable Documentation

byte TCLK_saved

Holds the last value of TCLK before entering a JTAG sequence.

Definition at line 77 of file LowLevelFunc430Xv2.c.

byte tdo_bit

Holds the value of TDO-bit.

Definition at line 75 of file LowLevelFunc430Xv2.c.


Copyright 2016, Texas Instruments Incorporated