This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F6659: Retrieving the TVL Peripheral to see if it is in this MCU

Part Number: MSP430F6659
Other Parts Discussed in Thread: MSP430WARE

Tool/software:

Using file:
C:\ti\msp\MSP430Ware_3_80_14_01\driverlib\examples\MSP430FR5xx_6xx\tlv\tlv_ex2_readTLVDescriptors.c

main() calls readPeripheral() which calls TLV_getPeripheral().

In TLV_getPeripheral on line 166: if(pPDTAG[count + 1] == tag)
the program goes off and never returns.

The last time thru the for-loop I see:

count=76, pcount=330, tag=0x98, pPDTAG[0x3f, 0xff], pPDTAG=0x1abc

so this seems correct.

What might be going on here?

You view the contents of TLV_getPeripheral() here: github.com/.../tlv.c
Line 336 is where the program is hanging.

  • Something that disturbs me about the linked code is that after calling TLV_getInfo() no check is made to see if the tag was found. Which means that the following code which assumes it has a valid pointer into the TLV structure, might not.

    Missing is validation of the CRC. Which really ought to be done before any attempt to use the TLV data.

**Attention** This is a public forum