2023-03-29 11:09 PM
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.
• 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)
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,
Solved! Go to Solution.
2023-03-30 02:42 AM
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.
2023-03-30 12:01 AM
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
2023-03-30 01:20 AM
Hi Peter.
I have removed SB46 and SB52, but it still does not change anything.
do you have any other recommend?
Thanks.
2023-03-30 02:42 AM
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.