cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3911B X-CUBE-NFC5(Out of Memory Error)

Marius Celliers
Associate III
Posted on June 25, 2018 at 00:29

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 #st25r3911b
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on July 10, 2018 at 15:03

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.

View solution in original post

4 REPLIES 4
Ulysses HERNIOSUS
ST Employee
Posted on July 02, 2018 at 16:54

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

Posted on July 02, 2018 at 19:17

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6g4&d=%2Fa%2F0X0000000bt2%2F0XfdHQ8Uc..9LZhyWG9RhTxruFF7D2WGjRuY2KUKwCk&asPdf=false
Posted on July 10, 2018 at 09:51

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

Posted on July 10, 2018 at 15:03

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.