cancel
Showing results for 
Search instead for 
Did you mean: 

Errors in initializing ST25R3911B

vaibh_p
Associate II

Hey hi ,

Can anybody suggest why ST25R3911B is giving following errors:

  • I am using "exampleRfalNfca.c" example provided in RFAL library doc.

The ST25R3911B IC is initializing properly for some initial functions but while starting field on and timer it gives some error as described below:

  1. rfalInitialize() ; No Error
  2. rfalFieldOff() : No Error
  3. rfalNfcaPollerInitialize() : No Error
  4. rfalFieldOnAndStartGT() : Gives "ReturnCode" error as "0x0C"
    1. After debugging in this function , found out following problems:
    2. rfalSetAnalogConfig() : Gives no error
    3. st25r3911PerformCollisionAvoidance() : this returns with the error "0x0C"

And further after in main loop , the Poller fucntion "rfalNfcaPollerTechnologyDetection()" is returning with error "0x03".

Need some help to debug what causing the problem.

11 REPLIES 11

0693W000003PJLZQA4.png0693W000003PJLUQA4.pngI ran into the same issue of the read multiple registers being seen as 2 SPItransactions. I also have a SPI driver that manages the CS pin. What I did was to let the SPI manage the CS pin as well as left the platformSpiSelect() and platformSpiDeselect() functions as is and defined the #define ST25R391X_COM_SINGLETXRX macro in my platform.h.

If you dig around in the rfal library you will see that using the ST25R391X_COM_SINGLETXRX makes all ST25R SPI transactions into a single transaction.

Since the SPI drivers I am using are shared across different projects in my company, I did not have the liberty of modifying the CS pin management. In this case using the macro worked out perfectly for me.

Oh that's really good to know. Thanks a lot for the help, I have the RFAL library finally working now on my ESP32.