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.

DLP-7970ABP: Read write RFID memory locations

Part Number: DLP-7970ABP
Other Parts Discussed in Thread: MSP-EXP430F5529LP, , TRF7970A, MSP-EXP430G2ET, TRF7960

Hi all,

Just about to kick start a project where we need to read and write data to memory blocks in a RFID. We just want to clarify a few items before we go too far.

A few notes

Some questions

  1. In general, if we want to modify the existing code to read  and write from certain memory locations on the RFID how do we do this? Do we just modify the .net solution or do we also have to also modify the software running on the TI chip?
  2. As best I can tell you communicate over a COM port. How do you access the memory locations of the RFID in this way?

Thanks in advance

  • Hello John,

    I'm glad to see your interest in the TRF7970A evaluation.

    Here are my answers to your questions:

    1. This demo is reading the entire memory content of a tag automatically. If you want to limit it to specific memory locations then you have to modify the MSP-EXP430F5529LP firmware (source located at: [Installed Path]\examples\boards\MSP-EXP430F5529LP\F5529LP_TRF7970A_ALL_NFC_MODES). You would have to modify the corresponding tag state machine.

    2. I'm not sure if this example firmware provides COM port functions to address specific memory blocks. Most likely not. There is another example firmware available for the MSP-EXP430G2ET LaunchPad (http://www.ti.com/lit/zip/sloc297). This firmware is working without a PC GUI and all interaction is done via COM port only. Maybe this code can give you an idea on how to access specific memory blocks via COM port.

    Which tag type are you trying to access? ISO15693?

    Best regards,

    Andreas.

  • Hi Andreas

    Many thanks for your reply

    Based upon your answers can I ask you for a few more questions

    • Does it make sense to have a PC either running Windows or Linus to interface to the MSP-EXP430F5529LP or is this overkill. Basically we are just trying to read & write to the RFID in a production environment using the TRF7970A? What would you recommend?
    • Is there another TI board that can interface to the TRF7970A. It would also need to be able to support a handheld usb barcode scanner, network connection, GUI creation and a HDMI out

    Thanks in advance

  • Hello John,

    the PC interface depends on the use case. If it is required to display something to an operator or to get inputs from him then you would need a PC GUI. If you just want to write and read data without user interaction, then this can be handled by an MCU.

    The TI boards (MSP-EXP430F5529LP and MSP-EXP430G2ET) are intended for evaluation and development purposes. They are universal usable. If it comes to a mass production product with the TRF7970A then typically a custom board design is done, which combines MCU and TRF7970A. Interfaces for your handheld and barcode scanner could be also added to your custom board design. If you still want to use the TI launch pads then there might be unused I/O pins left for connecting a handheld and bar code scanner (feasibility depends on the interface type). There is a broad variety of TI launchpads available (see this technical article), but you would have to select cording to your requirements. Please also note that the given MCU firmware would need development effort. There is no ready to use solution available other than the given examples for MSP-EXP430F5529LP and MSP-EXP430G2ET.

    Let me know if you have further questions.

    Best regards,

    Andreas.

  • Hi,

    There was no feedback since a while, so I assume this tread is resolved and can be closed. You can still reply to this thread after it is closed, or you can create a new thread.

    Best  Regards,
    Andreas.

  • Hi Andreas,

    I was away for a few weeks so sorry got the delayed response.

    I have a working source code project that is a Visual studio solution that was used with a trf7960 and a custom processor. I need to get the code working with a TRF7970A + 430.

    So a couple of questions

    I have this code and I want to use it with trf7970A

    BOOL readMemBlock(UINT8 mem_block_num, BYTE *data_read_buf, BYTE *mem_lock_status)
    {
    	// Request Mode, Address Flag & Option Flag, Read cmd, UID, Block #, Data (64-bits)
    	static BYTE data[12];
    	char read_err_code[3], mem_block_lock_byte[3], tmp_str_buff[3];
    	INT8 i;
    
    	// Beginning of command
    	data[0] = 0x18;
    	data[1] = 0x60;
    	if (ISO_CONTROL & 0x02 )
    	{
    		data[1] = data[1] | 0x02; // Set to use high bit rate (26.48 kbps)
    	}		
    	data[2] = 0x20;
    
    	// Add UID
    	for (i=0; i<8; i++)
    	{
    		data[i+3] = UID_LSB[i];
    	}
    
    	// Add the block number to write
    	data[11] = mem_block_num;
    
    	// Send the command
    	if (!sendCmd(data, sizeof(data), COMPortNum))
    	{
    		return FALSE;
    	}
    }

    and this

    BOOL sendCmd(const unsigned char *data, size_t cmd_len, wstring COM_num)
    {
    	size_t packet_len, i;
    	BOOL retval = TRUE;
    	char *curr_cmd_pos;
    
    	// The packet length is the number of characters that will be sent via USB,
    	// not the number of bytes that will be transmitted by the TRF7960
    	packet_len = (cmd_len+7)*2;
    
    	/* Given the cmd length, create the packet */
    	char *packet = new char[packet_len+1];
    
    	curr_cmd_pos = packet;
    	curr_cmd_pos += sprintf_s(packet, 11, "01%02X000304", cmd_len+7);
    	for (i=0; i<cmd_len; i++)
    	{
    		curr_cmd_pos += sprintf_s(curr_cmd_pos, 3, "%02X", data[i]);
    	}
    	curr_cmd_pos += sprintf_s(curr_cmd_pos, 5, "0000");
    
    	// Send the command to the COM port
    	if (!comMgr->portWrite(COM_num, FALSE, packet, packet_len))
    	{
    		retval = FALSE;
    	}
    
    	delete [] packet;
    	
    	return retval;
    }
    

    • The old processor used with the TRF9760 was Embedded chip - PIC32MX5XX6XX7XX_Family)Datasheet_DS60001156K. What's the most straightforward way of getting this all working on a new platform along with the TRF7970A
    • How easy should it be to port the code from TRF7960 to the TRF7970A with the  MSP-EXP430F5529LP . Should the code be the same? 
    • Is it possible to have a call with someone on this in TI to speed up these questions as we are under time pressures to resolve?

    Thanks in advance

    John

  • Hi Andreas,

    I forgot to say I am using these tags

    https://www.verigenics.com/gammatag-rfid-tags.htm

    Thanks

    John

  • Hi Andreas,

    I was away for a few weeks so sorry got the delayed response.

    I have a working source code project that is a Visual studio solution that was used with a trf7960 and a custom processor. I need to get the code working with a TRF7970A + 430.

    So a couple of questions

    I have this code and I want to use it with trf7970A

    BOOL readMemBlock(UINT8 mem_block_num, BYTE *data_read_buf, BYTE *mem_lock_status)
    {
    	// Request Mode, Address Flag & Option Flag, Read cmd, UID, Block #, Data (64-bits)
    	static BYTE data[12];
    	char read_err_code[3], mem_block_lock_byte[3], tmp_str_buff[3];
    	INT8 i;
    
    	// Beginning of command
    	data[0] = 0x18;
    	data[1] = 0x60;
    	if (ISO_CONTROL & 0x02 )
    	{
    		data[1] = data[1] | 0x02; // Set to use high bit rate (26.48 kbps)
    	}		
    	data[2] = 0x20;
    
    	// Add UID
    	for (i=0; i<8; i++)
    	{
    		data[i+3] = UID_LSB[i];
    	}
    
    	// Add the block number to write
    	data[11] = mem_block_num;
    
    	// Send the command
    	if (!sendCmd(data, sizeof(data), COMPortNum))
    	{
    		return FALSE;
    	}
    }

    and this

    BOOL sendCmd(const unsigned char *data, size_t cmd_len, wstring COM_num)
    {
    	size_t packet_len, i;
    	BOOL retval = TRUE;
    	char *curr_cmd_pos;
    
    	// The packet length is the number of characters that will be sent via USB,
    	// not the number of bytes that will be transmitted by the TRF7960
    	packet_len = (cmd_len+7)*2;
    
    	/* Given the cmd length, create the packet */
    	char *packet = new char[packet_len+1];
    
    	curr_cmd_pos = packet;
    	curr_cmd_pos += sprintf_s(packet, 11, "01%02X000304", cmd_len+7);
    	for (i=0; i<cmd_len; i++)
    	{
    		curr_cmd_pos += sprintf_s(curr_cmd_pos, 3, "%02X", data[i]);
    	}
    	curr_cmd_pos += sprintf_s(curr_cmd_pos, 5, "0000");
    
    	// Send the command to the COM port
    	if (!comMgr->portWrite(COM_num, FALSE, packet, packet_len))
    	{
    		retval = FALSE;
    	}
    
    	delete [] packet;
    	
    	return retval;
    }
    

    • The old processor used with the TRF9760 was Embedded chip - PIC32MX5XX6XX7XX_Family)Datasheet_DS60001156K. What's the most straightforward way of getting this all working on a new platform along with the TRF7970A. Is there a document that describes how to port SPI read and writes using Microchip code and porting to TI 430 platform?
    • How easy should it be to port the code from TRF7960 to the TRF7970A with the  MSP-EXP430F5529LP ?
    • Is it possible to have a call with someone on this in TI to speed up these questions as we are under time pressures to resolve?

    Thanks in advance

    John

  • Hi,

    sorry for the delayed response. I was out of office.
    I have to catch up on many threads, so please be patient until I can work on your request.

    Best  Regards,
    Andreas.

  • Hello John,

    Unfortunately there is no porting guide from other MCU platforms available. But there are two example firmware available (see chapter 1.3 in the FAQ document). Maybe it would be the best strategic approach to start all over with one of these two examples as a baseline.

    Porting a code from TRF7960 to TRF7970A should not be too complicated. One major change would be the SPI handling (see chapter 1.1 in this application note "Using the SPI Interface with TRF7960"). Other differences can be found in the document "TRF7960 and TRF7970A Comparison"). But the two example firmware, mentioned earlier, are already customized to the TRF7970A.

    We can have a call if you want, but I'm not really a code specialist for the TRF7970A. Please let me know if you still want a call.

    Best regards,

    Andreas.

  • Hi,

    There was no feedback since a while, so I assume this tread is resolved and can be closed. You can still reply to this thread after it is closed, or you can create a new thread.

    Best  Regards,
    Andreas.