MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.70.00.08
 All Data Structures Files Functions Variables Enumerations Modules Pages
tlv

Functions

void TLV_getInfo (uint8_t tag, uint8_t instance, uint8_t *length, uint16_t **data_address)
 Gets TLV Info. More...
 
uint16_t TLV_getDeviceType ()
 Retrieves the unique device ID from the TLV structure. More...
 
uint16_t TLV_getMemory (uint8_t instance)
 Gets memory information. More...
 
uint16_t TLV_getPeripheral (uint8_t tag, uint8_t instance)
 Gets peripheral information from the TLV. More...
 
uint8_t TLV_getInterrupt (uint8_t tag)
 Get interrupt information from the TLV. More...
 

Detailed Description

Function Documentation

uint16_t TLV_getDeviceType ( void  )

Retrieves the unique device ID from the TLV structure.

Returns
The device ID is returned as type uint16_t.
void TLV_getInfo ( uint8_t  tag,
uint8_t  instance,
uint8_t *  length,
uint16_t **  data_address 
)

Gets TLV Info.

The TLV structure uses a tag or base address to identify segments of the table where information is stored. Some examples of TLV tags are Peripheral Descriptor, Interrupts, Info Block and Die Record. This function retrieves the value of a tag and the length of the tag.

Parameters
tagrepresents the tag for which the information needs to be retrieved. Valid values are:
  • TLV_TAG_LDTAG
  • TLV_TAG_PDTAG
  • TLV_TAG_Reserved3
  • TLV_TAG_Reserved4
  • TLV_TAG_BLANK
  • TLV_TAG_Reserved6
  • TLV_TAG_Reserved7
  • TLV_TAG_TAGEND
  • TLV_TAG_TAGEXT
  • TLV_TAG_TIMER_D_CAL
  • TLV_DEVICE_ID_0
  • TLV_DEVICE_ID_1
  • TLV_TAG_DIERECORD
  • TLV_TAG_ADCCAL
  • TLV_TAG_ADC12CAL
  • TLV_TAG_ADC10CAL
  • TLV_TAG_REFCAL
  • TLV_TAG_CTSD16CAL
instanceIn some cases a specific tag may have more than one instance. For example there may be multiple instances of timer calibration data present under a single Timer Cal tag. This variable specifies the instance for which information is to be retrieved (0, 1, etc.). When only one instance exists; 0 is passed.
lengthActs as a return through indirect reference. The function retrieves the value of the TLV tag length. This value is pointed to by *length and can be used by the application level once the function is called. If the specified tag is not found then the pointer is null 0.
data_addressacts as a return through indirect reference. Once the function is called data_address points to the pointer that holds the value retrieved from the specified TLV tag. If the specified tag is not found then the pointer is null 0.
Returns
None

Referenced by TLV_getInterrupt(), TLV_getMemory(), and TLV_getPeripheral().

uint8_t TLV_getInterrupt ( uint8_t  tag)

Get interrupt information from the TLV.

This function is used to retrieve information on available interrupt vectors. It allows the user to check if a specific interrupt vector is defined in a given device.

Parameters
tagrepresents the tag for the interrupt vector. Interrupt vector tags number from 0 to N depending on the number of available interrupts. Refer to the device datasheet for a list of available interrupts.
Returns
The returned value is zero is the specified interrupt vector is not defined.

References TLV_getInfo(), and TLV_getMemory().

uint16_t TLV_getMemory ( uint8_t  instance)

Gets memory information.

The Peripheral Descriptor tag is split into two portions a list of the available flash memory blocks followed by a list of available peripherals. This function is used to parse through the first portion and calculate the total flash memory available in a device. The typical usage is to call the TLV_getMemory which returns a non-zero value until the entire memory list has been parsed. When a zero is returned, it indicates that all the memory blocks have been counted and the next address holds the beginning of the device peripheral list.

Parameters
instanceIn some cases a specific tag may have more than one instance. This variable specifies the instance for which information is to be retrieved (0, 1 etc). When only one instance exists; 0 is passed.
Returns
The returned value is zero if the end of the memory list is reached.

References TLV_getInfo().

Referenced by TLV_getInterrupt(), and TLV_getPeripheral().

uint16_t TLV_getPeripheral ( uint8_t  tag,
uint8_t  instance 
)

Gets peripheral information from the TLV.

he Peripheral Descriptor tag is split into two portions a list of the available flash memory blocks followed by a list of available peripherals. This function is used to parse through the second portion and can be used to check if a specific peripheral is present in a device. The function calls TLV_getPeripheral() recursively until the end of the memory list and consequently the beginning of the peripheral list is reached. <

Parameters
tagrepresents represents the tag for a specific peripheral for which the information needs to be retrieved. In the header file tlv. h specific peripheral tags are pre-defined, for example USCIA_B and TA0 are defined as TLV_PID_USCI_AB and TLV_PID_TA2 respectively. Valid values are:
  • TLV_PID_NO_MODULE - No Module
  • TLV_PID_PORTMAPPING - Port Mapping
  • TLV_PID_MSP430CPUXV2 - MSP430CPUXV2
  • TLV_PID_JTAG - JTAG
  • TLV_PID_SBW - SBW
  • TLV_PID_EEM_XS - EEM X-Small
  • TLV_PID_EEM_S - EEM Small
  • TLV_PID_EEM_M - EEM Medium
  • TLV_PID_EEM_L - EEM Large
  • TLV_PID_PMM - PMM
  • TLV_PID_PMM_FR - PMM FRAM
  • TLV_PID_FCTL - Flash
  • TLV_PID_CRC16 - CRC16
  • TLV_PID_CRC16_RB - CRC16 Reverse
  • TLV_PID_WDT_A - WDT_A
  • TLV_PID_SFR - SFR
  • TLV_PID_SYS - SYS
  • TLV_PID_RAMCTL - RAMCTL
  • TLV_PID_DMA_1 - DMA 1
  • TLV_PID_DMA_3 - DMA 3
  • TLV_PID_UCS - UCS
  • TLV_PID_DMA_6 - DMA 6
  • TLV_PID_DMA_2 - DMA 2
  • TLV_PID_PORT1_2 - Port 1 + 2 / A
  • TLV_PID_PORT3_4 - Port 3 + 4 / B
  • TLV_PID_PORT5_6 - Port 5 + 6 / C
  • TLV_PID_PORT7_8 - Port 7 + 8 / D
  • TLV_PID_PORT9_10 - Port 9 + 10 / E
  • TLV_PID_PORT11_12 - Port 11 + 12 / F
  • TLV_PID_PORTU - Port U
  • TLV_PID_PORTJ - Port J
  • TLV_PID_TA2 - Timer A2
  • TLV_PID_TA3 - Timer A1
  • TLV_PID_TA5 - Timer A5
  • TLV_PID_TA7 - Timer A7
  • TLV_PID_TB3 - Timer B3
  • TLV_PID_TB5 - Timer B5
  • TLV_PID_TB7 - Timer B7
  • TLV_PID_RTC - RTC
  • TLV_PID_BT_RTC - BT + RTC
  • TLV_PID_BBS - Battery Backup Switch
  • TLV_PID_RTC_B - RTC_B
  • TLV_PID_TD2 - Timer D2
  • TLV_PID_TD3 - Timer D1
  • TLV_PID_TD5 - Timer D5
  • TLV_PID_TD7 - Timer D7
  • TLV_PID_TEC - Timer Event Control
  • TLV_PID_RTC_C - RTC_C
  • TLV_PID_AES - AES
  • TLV_PID_MPY16 - MPY16
  • TLV_PID_MPY32 - MPY32
  • TLV_PID_MPU - MPU
  • TLV_PID_USCI_AB - USCI_AB
  • TLV_PID_USCI_A - USCI_A
  • TLV_PID_USCI_B - USCI_B
  • TLV_PID_EUSCI_A - eUSCI_A
  • TLV_PID_EUSCI_B - eUSCI_B
  • TLV_PID_REF - Shared Reference
  • TLV_PID_COMP_B - COMP_B
  • TLV_PID_COMP_D - COMP_D
  • TLV_PID_USB - USB
  • TLV_PID_LCD_B - LCD_B
  • TLV_PID_LCD_C - LCD_C
  • TLV_PID_DAC12_A - DAC12_A
  • TLV_PID_SD16_B_1 - SD16_B 1 Channel
  • TLV_PID_SD16_B_2 - SD16_B 2 Channel
  • TLV_PID_SD16_B_3 - SD16_B 3 Channel
  • TLV_PID_SD16_B_4 - SD16_B 4 Channel
  • TLV_PID_SD16_B_5 - SD16_B 5 Channel
  • TLV_PID_SD16_B_6 - SD16_B 6 Channel
  • TLV_PID_SD16_B_7 - SD16_B 7 Channel
  • TLV_PID_SD16_B_8 - SD16_B 8 Channel
  • TLV_PID_ADC12_A - ADC12_A
  • TLV_PID_ADC10_A - ADC10_A
  • TLV_PID_ADC10_B - ADC10_B
  • TLV_PID_SD16_A - SD16_A
  • TLV_PID_TI_BSL - BSL
instanceIn some cases a specific tag may have more than one instance. For example a device may have more than a single USCI module, each of which is defined by an instance number 0, 1, 2, etc. When only one instance exists; 0 is passed.
Returns
The returned value is zero if the specified tag value (peripheral) is not available in the device.

References TLV_getInfo(), and TLV_getMemory().


Copyright 2016, Texas Instruments Incorporated