2022-10-01 06:48 AM
I am using Nucleo-L476 board and NFC06A1.
With the Free RTOS sample (ST25NFC_Embedded_Lib_ST25R3916_1.4.0, FreeRTOS_polling), I am aleady verified the NFC card operation with the SPI interface.
I tried to check the operation with I2C instead of SPI, but it did not work, so please inquire.
* Apply UM2616 documnet 3.5.1 item
1) H/W setup
• solder ST2 and ST4 jumpers
• solder R116 and R117 pull-up resistors
• remove the SPI solder bridge(R205)
• put the I²C solder bridge(R204)
2) S/W setup
• set RFAL_USE_I2C in the pre-processor
• rename USE_HAL_SPI_REGISTER_CALLBACKS by USE_HAL_I2C_REGISTER_CALLBACKS
* Status
Within the "st25r3916Initialize" function, it proceeds only to the "st25r3916ExecuteCommand( ST25R3916_CMD_SET_DEFAULT )", and does not proceed any further.
Inside the "BSP_I2C1_SequencialSend" function, the "hi2c->State" value does not change to HAL_I2C_STATE_READY.
To use I2C interface, is there anything else to add other than 3.5.1 items of the UM2616 article?
Solved! Go to Solution.
2022-10-05 09:02 AM
Hi,
I've tried on my side. Some extra modifications are needed in order to run the FreeRTOS demo in I2C mode:
Let me know whether this working on your side.
Rgds
BT
2022-10-03 01:30 AM
Hi,
UM2616 is related to the X-CUBE-NFC6 package where both SPI and I2C support is provided.
The FreeRTOS_polling demo is provided in the ST25 embedded NFC library package and supports SPI communication (I2C code is included but the demo has been tested in SPI mode only).
What is the value of the R116 and R117 pullups resistors? (as far as I remember, the recommended value is 1k65).
What is the return code of BSP_I2C1_Init()?
Rgds
BT
2022-10-03 02:05 AM
As you remember, R116 and R117 used 1k 65.
The return code of BSP_I2C1_Init is BSP_ERROR_NONE.
Is there any sample project that uses I2C interface?
2022-10-03 02:22 AM
Hi,
the PollingTagDetect demo in the X-CUBE-NFC6 package uses the I2C demo (when RFAL_USE_I2C is set and USE_HAL_SPI_REGISTER_CALLBACKS has been renamed to USE_HAL_I2C_REGISTER_CALLBACKS)
Rgds
BT
2022-10-03 03:38 AM
Dear Brian,
As mentioned in the first post, I already rename USE_HAL_SPI_REGISTER_CALLBACKS to USE_HAL_I2C_REGISTER_CALLBACKS in the pre-processor section.
Regards,
2022-10-03 03:45 AM
Hi,
this was just to indicate that by default the PollingTagDetect demo from the X-CUBE-NFC6 uses by default the SPI and that you will have to apply those changes if you want to move it to I2C for testing.
Although the FreeRTOS_polling demo has only been tested in SPI, I do not see obvious reason to have it not working in I2C with you changes.
Rgds
BT
2022-10-05 09:02 AM
Hi,
I've tried on my side. Some extra modifications are needed in order to run the FreeRTOS demo in I2C mode:
Let me know whether this working on your side.
Rgds
BT
2022-10-05 07:08 PM
Dear Brian,
As a result of applying your guide, it works OK with I2C interface.
Regards,