cancel
Showing results for 
Search instead for 
Did you mean: 

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

HAnh
Associate III

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,

1 ACCEPTED SOLUTION

Accepted Solutions

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.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
HAnh
Associate III

Hi Peter.

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

do you have any other recommend?

Thanks.

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.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.