ST25R3916 ERR_TIMEOUT with long messages
Hello everyone,
I am working with
- uC STM32F7 (main board)
- NFC Reader ST25R3916 ( pcb NFC reader)
- NFC ST25DV dynamic tag (pcb NFC tag)
My project is working with freeRTOS and I have been writing my code based in the FreeRTOS_polling project from ST25NFC_EMBEDDED_LIB_ST25R3916_1.3.0.
At this moment I am able to read/write different NFC Tag registers from NFC Reader without problems. I configured the NFC Reader in FTM mode so I am working with the 256 buffer.
Once I detected my card and the rfal process is able to exchange info I put the next code.
int32_t nfc_reader_wr(rfalNfcvListenDevice *nfcvDev , uint8_t *message, uint16_t len) {
ReturnCode err;
static uint8_t tx_buf[200];
uint8_t *uid;
/*TEST WRITE*/
uint8_t rxBuf[ 1 + DEMO_NFCV_BLOCK_LEN + RFAL_CRC_LEN ]; /* Flags + Block Data + CRC */
// known data
static uint8_t tx_msg[66] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\
,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45\
,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65};
uid = nfcvDev->InvRes.UID;
uint8_t test_len = 60;
err = rfalNfcvPollerSelect(RFAL_NFCV_REQ_FLAG_DEFAULT, nfcvDev->InvRes.UID );
if( err == ERR_NONE )
{
uid = NULL;
}
// This case works correctly
err = rfalST25xVPollerWriteMessage( RFAL_NFCV_REQ_FLAG_DEFAULT, uid, 50 -1 , tx_msg, (uint8_t*)tx_buf, 200 );
osDelay(500);
// In this case I get ERR_TIMEOUT
err = rfalST25xVPollerWriteMessage( RFAL_NFCV_REQ_FLAG_DEFAULT, uid, 60 -1 , tx_msg, (uint8_t*)tx_buf, 200 );
osDelay(500);
err = rfalST25xVPollerReadDynamicConfiguration( RFAL_NFCV_REQ_FLAG_DEFAULT, uid, 0x0D, rxBuf );
osDelay(500);
err = rfalST25xVPollerReadMessageLength( RFAL_NFCV_REQ_FLAG_DEFAULT, uid, rxBuf );
}While I can write 50 bytes of information to the NFC tag correctly (line 25) , I get the ERR_TIMEOUT when I try to write 60 bytes. (line 28)
- I checked that the buffer created has the correct information.
- I stoped the freeRTOS execution during rfalST25xVPollerWriteMessage()
- I force to increase the NRT timer timeout.
Any help would be great!
