Macros | Functions
JTAGfunc430X.h File Reference

Detailed Description

JTAG Function Prototypes and Definitions.

Definition in file JTAGfunc430X.h.

#include "Config430X.h"
Include dependency graph for JTAGfunc430X.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IR_CNTRL_SIG_16BIT   0xC8
 Set the JTAG control signal register. More...
 
#define IR_CNTRL_SIG_CAPTURE   0x28
 Read out the JTAG control signal register. More...
 
#define IR_CNTRL_SIG_RELEASE   0xA8
 Release the CPU from JTAG control. More...
 
#define IR_PREPARE_BLOW   0x44
 Prepare for JTAG fuse blow. More...
 
#define IR_EX_BLOW   0x24
 Perform JTAG fuse blow. More...
 
#define IR_DATA_16BIT   0x82
 Set the MSP430 MDB to a specific 16-bit value with the next 16-bit data access. More...
 
#define IR_DATA_QUICK   0xC2
 Set the MSP430 MDB to a specific 16-bit value (RAM only) More...
 
#define IR_DATA_PSA   0x22
 Switch JTAG data register to PSA mode. More...
 
#define IR_SHIFT_OUT_PSA   0x62
 Shift out the PSA pattern generated by IR_DATA_PSA. More...
 
#define IR_ADDR_16BIT   0xC1
 Set the MSP430 MAB to a specific 16-bit value. More...
 
#define IR_ADDR_CAPTURE   0x21
 Read out the MAB data on the next 16/20-bit data access. More...
 
#define IR_DATA_TO_ADDR   0xA1
 Set the MSP430 MDB with a specific 16-bit value and write it to the memory address which is currently on the MAB. More...
 
#define IR_BYPASS   0xFF
 Bypass instruction - TDI input is shifted to TDO as an output. More...
 
#define JTAG_ID   0x89
 JTAG identification value for 430X architecture devices. More...
 
#define F_BYTE   8
 
#define F_WORD   16
 
#define V_RESET   0xFFFE
 
#define VPP_ON_TDI   0
 
#define VPP_ON_TEST   1
 
#define GetDevice   GetDevice_430X
 
#define ReleaseDevice   ReleaseDevice_430X
 
#define WriteMem   WriteMem_430X
 
#define WriteMemQuick   WriteMemQuick_430X
 
#define WriteFLASH   WriteFLASH_430X
 
#define WriteFLASHallSections   WriteFLASHallSections_430X
 
#define ReadMem   ReadMem_430X
 
#define ReadMemQuick   ReadMemQuick_430X
 
#define EraseFLASH   EraseFLASH_430X
 
#define EraseCheck   EraseCheck_430X
 
#define VerifyMem   VerifyMem_430X
 

Functions

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 out from the target device. It is used for very fast data block write or erasure verification. More...
 
word GetDevice_430X (void)
 Function to take target device under JTAG control. Disables the target watchdog. Sets the global DEVICE variable as read from the target device. More...
 
void ReleaseDevice_430X (unsigned long Addr)
 Function to release the target device from JTAG control. More...
 
void WriteMem_430X (word Format, unsigned long Addr, word Data)
 This function writes one byte/word at a given address ( <0xA00) More...
 
void WriteMemQuick_430X (unsigned long StartAddr, unsigned long Length, word *DataArray)
 This function writes an array of words into the target memory. More...
 
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. More...
 
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 "WriteFLASH()" function. It conforms with the "CodeArray" structure convention of file "Target_Code_(IDE).s43" or "Target_Code.h". More...
 
word ReadMem_430X (word Format, unsigned long Addr)
 This function reads one byte/word from a given address in memory. More...
 
void ReadMemQuick_430X (unsigned long StartAddr, unsigned long Length, word *DataArray)
 This function reads an array of words from the memory. More...
 
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 specified by the given mode and address. Large memory devices get additional mass erase operations to meet the spec. (Could be extended with erase check via PSA) More...
 
word EraseCheck_430X (unsigned long StartAddr, unsigned long Length)
 This function performs an Erase Check over the given memory range. More...
 
word VerifyMem_430X (unsigned long StartAddr, unsigned long Length, word *DataArray)
 This function performs a Verification over the given memory range. More...
 
word BlowFuse (void)
 This function blows the security fuse. More...
 
word IsFuseBlown (void)
 This function checks if the JTAG access security fuse is blown. More...
 
void UnlockInfoA (void)
 This function unlocks segment A of the InfoMemory (Flash) More...
 

Macro Definition Documentation

#define IR_ADDR_16BIT   0xC1

Set the MSP430 MAB to a specific 16-bit value.

Use the 20-bit macro for 430X and 430Xv2 architectures

Definition at line 113 of file JTAGfunc430X.h.

#define IR_ADDR_CAPTURE   0x21

Read out the MAB data on the next 16/20-bit data access.

Definition at line 115 of file JTAGfunc430X.h.

#define IR_BYPASS   0xFF

Bypass instruction - TDI input is shifted to TDO as an output.

Definition at line 120 of file JTAGfunc430X.h.

#define IR_CNTRL_SIG_16BIT   0xC8

Set the JTAG control signal register.

Definition at line 85 of file JTAGfunc430X.h.

#define IR_CNTRL_SIG_CAPTURE   0x28

Read out the JTAG control signal register.

Definition at line 87 of file JTAGfunc430X.h.

#define IR_CNTRL_SIG_RELEASE   0xA8

Release the CPU from JTAG control.

Definition at line 89 of file JTAGfunc430X.h.

#define IR_DATA_16BIT   0x82

Set the MSP430 MDB to a specific 16-bit value with the next 16-bit data access.

Definition at line 100 of file JTAGfunc430X.h.

#define IR_DATA_PSA   0x22

Switch JTAG data register to PSA mode.

Definition at line 106 of file JTAGfunc430X.h.

#define IR_DATA_QUICK   0xC2

Set the MSP430 MDB to a specific 16-bit value (RAM only)

Definition at line 102 of file JTAGfunc430X.h.

#define IR_DATA_TO_ADDR   0xA1

Set the MSP430 MDB with a specific 16-bit value and write it to the memory address which is currently on the MAB.

Definition at line 118 of file JTAGfunc430X.h.

#define IR_EX_BLOW   0x24

Perform JTAG fuse blow.

Definition at line 95 of file JTAGfunc430X.h.

#define IR_PREPARE_BLOW   0x44

Prepare for JTAG fuse blow.

Definition at line 93 of file JTAGfunc430X.h.

#define IR_SHIFT_OUT_PSA   0x62

Shift out the PSA pattern generated by IR_DATA_PSA.

Definition at line 108 of file JTAGfunc430X.h.

#define JTAG_ID   0x89

JTAG identification value for 430X architecture devices.

Definition at line 124 of file JTAGfunc430X.h.

Function Documentation

word BlowFuse ( void  )

This function blows the security fuse.

Returns
word (TRUE if burn was successful, FALSE otherwise)

Definition at line 1038 of file JTAGfunc430X.c.

Here is the call graph for this function:

word EraseCheck_430X ( unsigned long  StartAddr,
unsigned long  Length 
)

This function performs an Erase Check over the given memory range.

Parameters
[in]wordStartAddr (Start address of memory to be checked)
[in]wordLength (Number of words to be checked)
Returns
word (STATUS_OK if erase check was successful, STATUS_ERROR otherwise)

Definition at line 1018 of file JTAGfunc430X.c.

Here is the call graph for this function:

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 specified by the given mode and address. Large memory devices get additional mass erase operations to meet the spec. (Could be extended with erase check via PSA)

Parameters
[in]wordMode (could be ERASE_MASS or ERASE_MAIN or ERASE_SGMT)
[in]wordAddr (any address within the selected segment)

Definition at line 932 of file JTAGfunc430X.c.

Here is the call graph for this function:

word GetDevice_430X ( void  )

Function to take target device under JTAG control. Disables the target watchdog. Sets the global DEVICE variable as read from the target device.

Returns
word (STATUS_ERROR if fuse is blown, incorrect JTAG ID or synchronizing time-out; STATUS_OK otherwise)

Definition at line 632 of file JTAGfunc430X.c.

Here is the call graph for this function:

word IsFuseBlown ( void  )

This function checks if the JTAG access security fuse is blown.

Returns
word (STATUS_OK if fuse is blown, STATUS_ERROR otherwise)

Definition at line 1072 of file JTAGfunc430X.c.

word ReadMem_430X ( word  Format,
unsigned long  Addr 
)

This function reads one byte/word from a given address in memory.

Parameters
[in]wordFormat (F_BYTE or F_WORD)
[in]wordAddr (address of memory)
Returns
word (content of the addressed memory location)

Definition at line 871 of file JTAGfunc430X.c.

void ReadMemQuick_430X ( unsigned long  StartAddr,
unsigned long  Length,
word *  DataArray 
)

This function reads an array of words from the memory.

Parameters
[in]wordStartAddr (Start address of memory to be read)
[in]wordLength (Number of words to be read)
[out]word*DataArray (Pointer to array for the data)

Definition at line 902 of file JTAGfunc430X.c.

void ReleaseDevice_430X ( unsigned long  Addr)

Function to release the target device from JTAG control.

Parameters
[in]wordAddr (0xFFFE: Perform Reset, means Load Reset Vector into PC, otherwise: Load Addr into PC)

Definition at line 693 of file JTAGfunc430X.c.

void UnlockInfoA ( void  )

This function unlocks segment A of the InfoMemory (Flash)

Definition at line 1089 of file JTAGfunc430X.c.

word VerifyMem_430X ( unsigned long  StartAddr,
unsigned long  Length,
word *  DataArray 
)

This function performs a Verification over the given memory range.

Parameters
[in]wordStartAddr (Start address of memory to be verified)
[in]wordLength (Number of words to be verified)
[in]word*DataArray (Pointer to array with the data)
Returns
word (STATUS_OK if verification was successful, STATUS_ERROR otherwise)

Definition at line 1030 of file JTAGfunc430X.c.

Here is the call graph for this function:

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 out from the target device. It is used for very fast data block write or erasure verification.

Parameters
[in]unsignedlong StartAddr (Start address of data block to be checked)
[in]unsignedlong Length (Number of words within data block)
[in]word*DataArray (Pointer to array with the data, 0 for Erase Check)
Returns
word (STATUS_OK if comparison was successful, STATUS_ERROR otherwise)

Definition at line 378 of file JTAGfunc430X.c.

Here is the call graph for this function:

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.

Parameters
[in]wordStartAddr (Start address of FLASH memory)
[in]wordLength (Number of words to be programmed)
[in]word*DataArray (Pointer to array with the data)

Definition at line 768 of file JTAGfunc430X.c.

Here is the call graph for this function:

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 "WriteFLASH()" function. It conforms with the "CodeArray" structure convention of file "Target_Code_(IDE).s43" or "Target_Code.h".

Parameters
[in]constunsigned int *DataArray (Pointer to array with the data)
[in]constunsigned long *address (Pointer to array with the startaddresses)
[in]constunsigned long *length_of_sections (Pointer to array with the number of words counting from startaddress)
[in]constunsigned long sections (Number of sections in code file)
Returns
word (STATUS_OK if verification was successful, STATUS_ERROR otherwise)

Definition at line 848 of file JTAGfunc430X.c.

void WriteMem_430X ( word  Format,
unsigned long  Addr,
word  Data 
)

This function writes one byte/word at a given address ( <0xA00)

Parameters
[in]wordFormat (F_BYTE or F_WORD)
[in]wordAddr (Address of data to be written)
[in]wordData (shifted data)

Definition at line 713 of file JTAGfunc430X.c.

void WriteMemQuick_430X ( unsigned long  StartAddr,
unsigned long  Length,
word *  DataArray 
)

This function writes an array of words into the target memory.

Parameters
[in]wordStartAddr (Start address of target memory)
[in]wordLength (Number of words to be programmed)
[in]word*DataArray (Pointer to array with the data)

Definition at line 741 of file JTAGfunc430X.c.


Copyright 2016, Texas Instruments Incorporated