cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to write on ISO -15693 card using ST25R3911B reader.

sach.56215330888194E12
Associate II

Hi,

 I'm using RFID reader ST25R3911B to read/write on ISO15693 card. I'm unable to perform a write to the card and i'm using "Writesingleblock" function mentioned in code/lib cube-nfc5(ver 1.2). I followed the steps which was mentioned in an earlier thread "https://community.st.com/s/question/0D50X00009XkWNXSA3/st25r3911b-calls-to-readwrite-block-after-successful-inventoryget-id" but still unable to get through.

In that it was mentioned to use Select mode instead of Address mode but while using Select mode i'm getting Timeout error. But if i switch to Address mode then Read goes through successfully but write ends up in Ignore Error. Then when i try to read back the block to which i have written it remains all zeros. Is there anything which i'm missing out on? Below is my reference code.

#define NFCV_BLOCK_LEN 4

ReturnCode  err1;

uint8_t rxBuf[1+NFCV_BLOCK_LEN+2];

uint16_t rcvLen = 1;

uint8_t wrBuf[NFCV_BLOCK_LEN] = {0x11,0x22,0x33,0x44};

 err = rfalNfcvPollerCollisionResolution(1, &nfcvDev, &devCnt);

 if( (err == ERR_NONE) && (devCnt > 0) )

 {

#if 0 //Select mode

 err1 = rfalNfvSelect(RFAL_NFCV_REQ_FLAG_DEFAULT,nfcvDev.InvRes.UID);

 if(err1 == ERR_NONE))

{

 err1 = rfalNfvReadSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT,NULL,3,rxBuf,sizeof(rxBuf),&rcvLen);

 if(err1 == ERR_NONE)

  {

   err1 = rfalNfvWriteSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT,NULL,3,wrBuf,sizeof(wrBuf));

 err1 = rfalNfvReadSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT,NULL,3,rxBuf,sizeof(rxBuf),&rcvLen);

  }

}

 #else //Address mode

 err1 = rfalNfvReadSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT,nfcvDev.InvRes.UID,3,rxBuf,sizeof(rxBuf),&rcvLen);

 if(err1 == ERR_NONE)

  {

   err1 = rfalNfvWriteSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT,nfcvDev.InvRes.UID,3,wrBuf,sizeof(wrBuf));

 err1 = rfalNfvReadSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT,nfcvDev.InvRes.UID,3,rxBuf,sizeof(rxBuf),&rcvLen);

  }

 #endif

}

12 REPLIES 12

Hi Ulysses,

In earlier threads ST mentioned about write function "rfalNfvWriteSingleBlock()" that it works on Select mode only and not in Address mode. Is there any limitation or an issue which ST will be looking into? Since in my scenario the product doesn't support Select Command as mentioned in datasheet so i have to use Address mode.

Regards,

Sach

Hi Sach,

the X-CUBE-NFC5 software should get an update soon with an updated RFAL which has this issue fixed. However the RFAL which you integrated from STSW-ST25RFAL001 is already fixed and should work in Adressed Mode as well.

Regards, Ulysses.

Hi Ulysses,

Finally it did work. I didn't merge the whole Rfal new lib source code but only modified Single Block Read and Write functions which was needed for my project. And since the datasheet only allows Address mode so i went and modified these functions for address mode only and it works now.

The "option" patch code within Single Block Write function was the catch until then i was getting ERR_IGNORE for some reason.

Thanks again for assisting me on the key areas. Continue the good work.

Regards,

Sach