2018-06-24 03:29 PM
Hi. I am Reading a few APDU Commands from a card using the ST25R3911B and the STM32F401.
I am using the
X-CUBE-NFC5 software expansion.
Before all my commands are completed, i get a 'ERR_NOMEM' error.
I am clearing the (rfalIsoDepApduBufFormat) txBuf and
(
rfalIsoDepApduBufFormat) r
xBuf every time before I run the rfalIsoDepStartApduTransceive(*par); command... Is there anything I should also clear to prevent the Out of Memory error? I have also tried to add delays between my APDU Commands to see if it would help.
#nfc05 #x-cube-nfc5 #st25r3911bSolved! Go to Solution.
2018-07-10 08:03 AM
Hi Grégiore.
Thank you for your reply. This morning I have gone through my code again and inside the function
SendApdu() I have a loop that detects the response. Inside the loop I had a HAL_Delay of 2 milliseconds just before I call rfalWorker(). This seems to have caused some timing issues with the messages hence the reason why it sometimes work and other times not. As soon as I removed the delay from the code, I have had no more issues on my APDU responses. I removed all delays from my code when waiting for incoming message.
Thank you for the assistance.
2018-07-02 07:54 AM
Hi Marius,
Maybe you can share some code snippets. Otherwise it is blind guessing: Could it by your are clearing the rxLen pointer? It should still point to a variable of proper length.
Regards, Ulrich
2018-07-02 12:17 PM
2018-07-10 02:51 AM
Hi Marius,
We need some more information to better understand the issue,
Could you provide more details about the APDUs being exchanged?
Is the error observed on different moments with the same or different cards?
Can it be that the the request APDUs are being calculated dynamically and and its length, or the same static sequence is sent?
Not only upon reception, the error ERR_NOMEM can also occur on transmission if the data length is too large.
Kind regards
GP
2018-07-10 08:03 AM
Hi Grégiore.
Thank you for your reply. This morning I have gone through my code again and inside the function
SendApdu() I have a loop that detects the response. Inside the loop I had a HAL_Delay of 2 milliseconds just before I call rfalWorker(). This seems to have caused some timing issues with the messages hence the reason why it sometimes work and other times not. As soon as I removed the delay from the code, I have had no more issues on my APDU responses. I removed all delays from my code when waiting for incoming message.
Thank you for the assistance.