Interfacing PN7160 with STM32WL to Discover, Read & Write ST25DV04KC Dynamic Tags

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interfacing PN7160 with STM32WL to Discover, Read & Write ST25DV04KC Dynamic Tags

791 Views
takshpatel
Contributor II

Hello Developers,

We are currently developing a product where we are looking to interface PN7160 NFC reader with STM32WL micro controller to communicate with ST25DV04KC dynamic tag for sending and receiving data between NFC reader and ST25DV tag using the mailbox feature of ST25DV. 

Q1: As ST25DV04KC is a ISO15693 RFID tag (or NFC type V). So, first thing i will like to know is how to configure the reader to communicate under ISO15693 mode such that i can discover the ST25DV tags and read it's UID using the reader ?

 

Q2: Also the ST25DV mailbox communication is using custom commands. So we will need to use a transceiver mode of the reader to send those custom commands. So is this transceiver mode same as Read Write mode ? If yes, how to configure the reader in this RW mode.

So can anyone please have a look and provide me steps, of how can i discover the ST25DV tag using the PN7160 reader.  

We also have thread going on for the same on the STM32 Community, but they can only provide us support with ST25DV tags and not Reader (PN7160) below is a link to it: 

https://community.st.com/s/feed/0D53W000027jr3YSAQ

Labels (1)
0 Kudos
4 Replies

702 Views
takshpatel
Contributor II

Hello, 

Thanks for response. 

I would like to know which function are used to write and read using 15693 protocol ?

0 Kudos

624 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

With this example, it is possible to read out ID. Custom commands can be sent like data packet.

 

Regards

Daniel

0 Kudos

614 Views
takshpatel
Contributor II

Hello,

So should i use the below code snippet as example for writing custom commands to NFC Tag ? 

 


void PCD_ISO15693_scenario (void)
{
#define BLK_NB_ISO15693 8
#define DATA_WRITE_ISO15693 0x11, 0x22, 0x33, 0x44

bool status;
unsigned char Resp[256];
unsigned char RespSize;
unsigned char ReadBlock[] = {0x02, 0x20, BLK_NB_ISO15693};
unsigned char WriteBlock[] = {0x02, 0x21, BLK_NB_ISO15693, DATA_WRITE_ISO15693};

status = NxpNci_ReaderTagCmd(ReadBlock, sizeof(ReadBlock), Resp, &RespSize);
if((status == NFC_ERROR) || (Resp[RespSize-1] != 0x00))
{
PRINTF(" Read block %d failed with error 0x%02x\n", ReadBlock[2], Resp[RespSize-1]);
return;
}
PRINTF(" Read block %d:", ReadBlock[2]); PRINT_BUF(" ", (Resp+1), RespSize-2);

/* Write */
status = NxpNci_ReaderTagCmd(WriteBlock, sizeof(WriteBlock), Resp, &RespSize);
if((status == NFC_ERROR) || (Resp[RespSize-1] != 0))
{
PRINTF(" Write block %d failed with error 0x%02x\n", WriteBlock[2], Resp[RespSize-1]);
return;
}
PRINTF(" Block %d written\n", WriteBlock[2]);

/* Read back */
status = NxpNci_ReaderTagCmd(ReadBlock, sizeof(ReadBlock), Resp, &RespSize);
if((status == NFC_ERROR) || (Resp[RespSize-1] != 0x00))
{
PRINTF(" Read block %d failed with error 0x%02x\n", ReadBlock[2], Resp[RespSize-1]);
return;
}
PRINTF(" Read block %d:", ReadBlock[2]); PRINT_BUF(" ", (Resp+1), RespSize-2);
}
0 Kudos

742 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi takshpatel:

Sorry we don't have knowledge about NON-NXP products.

But for PN7160 reader, we have a basic demo for 15693 protocol. The host MCU is i.MXRT1170, LPC55S6x, LPC82X.

You can download sw6705 for more details.

https://www.nxp.com/downloads/en/software/SW6705.zip

You need to import this package into MCUXpresso IDE to run it.

 

danielchen_0-1678198678976.png

As you can see, 15693 is supported in this demo

 

Regards

Daniel