2021-09-07 01:22 AM
Hi,
I would like to report 2 possible bugs on the rfalST25xVPollerWriteMessage implementation:
Best Regards
Gustavo
Solved! Go to Solution.
2021-09-07 06:19 AM
Hi,
updated versions of the RFAL are available either in the ST25 Embedded NFC library with several new demos or as a standalone version in RFAL for ST25R3911B. I would recommend the ST25 Embedded NFC library as it comes with demos.
Rgds
BT
2021-09-07 05:22 AM
Hi,
which version of RFAL do you use (see #define RFAL_VERSION in rfal_rf.h)?
Issue #1 has been corrected and the fix is provided in latest RFAL versions. The updated code in line 205 is the following:
/* Check for valid parameters */
if( (txBuf == NULL) || (msgData == NULL) || (txBufLen < msgIt) )
{
return ERR_PARAM;
}
Regarding the second issue you reported, here is the format of the Write Message:
Thus, the size of the buffer is the sum of:
Therefore , if I am not wrong, line 202 is correct:
/* Calculate required Tx buf length: Mfg Code UID MSGLen MSGLen+1 */
msgIt = (uint16_t)( msgLen + sizeof(flags) + sizeof(cmd) + 1U + ((uid != NULL) ? RFAL_NFCV_UID_LEN : 0U) + 1U + 1U );
Note: the MSGLen parameter has been clarified in the comments:
/* Note: MSGlength parameter of the command is the number of Data bytes minus - 1 (00 for 1 byte of data, FFh for 256 bytes of data) */
One additional information, the ST25 Embedded NFC library provides a ST25 fast transfer mode embedded library. See Application Note AN5512 and related ST25NFC_Embedded_Lib_ST25R3916\Projects\STM32L476RG-Nucleo\Applications\X-NUCLEO-NFC06A1\FTM demo.
Rgds
BT
2021-09-07 06:11 AM
Hi @Brian TIDAL_O , thanks for the fast reply!
#1 I am using v2.0.10, just checked and this is the latest one available on https://www.st.com/en/embedded-software/x-cube-nfc5.html
Where can I find this updated version of the NFC5 RFAL?
#2 You are right, the last +1 is the correct offset for msgLen when considering its value is "number of Data bytes minus 1", my bad!
#3 Didnt know about this lib, I will take a look, thanks!
2021-09-07 06:19 AM
Hi,
updated versions of the RFAL are available either in the ST25 Embedded NFC library with several new demos or as a standalone version in RFAL for ST25R3911B. I would recommend the ST25 Embedded NFC library as it comes with demos.
Rgds
BT