Unable to write on ISO -15693 card using ST25R3911B reader.
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
}
