Skip to main content
Visitor II
March 30, 2023
Solved

STM32duino X-NUCLEO-NFC06A1 Can't run with I2C interface

  • March 30, 2023
  • 2 replies
  • 1983 views

Hi Everyone.

I have tried test NFC use Nucleo-L152RE and X-Nucleo-NFC06A1.

I use STM32duino X-NUCLEO-NFC06A1 example to test. It run normally with SPI interface.

But when I change it to I2C interface, it can't run.

  • Hardware modification:

• 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)

  • Firmware modification:

use

#define I2C_ENABLED

Besides that, I have tried to test I2C scanner, to read the I2C address of NFC06A1, but it can't find I2C device.

What should I do in the next step to make it can run with I2C interface?

Thanks,

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    I just noticed that you are using stm32duino.

    Apparently there is still an incorrect assignment there, because I2C_ENABLED selects in the file X_NUCLEO_NFC06A1_HelloWorld.ino:

    #else
     #define dev_i2c Wire
     RfalRfST25R3916Class rfst25r3916(&dev_i2c, IRQ_PIN);
    #endif

    Instead of Wire, TwoWire might be meant, but I can't check that because I don't work with the Arduino GUI.

    2 replies

    Technical Moderator
    March 30, 2023

    This is probably due to the NUCLEO-L152RE, where PB8/PB9 are connected to other pins (here PC0...PC1) via two bridges SB52 and SB46 for compatibility with the Arduino.

    Please try if it works when you have removed SB46 and SB52?

    Regards

    /Peter

    HAnhAuthor
    Visitor II
    March 30, 2023

    Hi Peter.

    I have removed SB46 and SB52, but it still does not change anything.

    do you have any other recommend?

    Thanks.

    Technical Moderator
    March 30, 2023

    I just noticed that you are using stm32duino.

    Apparently there is still an incorrect assignment there, because I2C_ENABLED selects in the file X_NUCLEO_NFC06A1_HelloWorld.ino:

    #else
     #define dev_i2c Wire
     RfalRfST25R3916Class rfst25r3916(&dev_i2c, IRQ_PIN);
    #endif

    Instead of Wire, TwoWire might be meant, but I can't check that because I don't work with the Arduino GUI.