X-NUCLEO-NFC08A1 with Linux Demo on Raspberry fails with SPI and I2C
Hello everyone! I have difficulties to run the 2.8.0 Linux Demo (the latest one) the X-NUCLEO-NFC08A1 with the ST25R3916B on Linux/Raspberry both with SPI as well as the less oftendused I2C. I don't have the interface board "ARPI600" to interface the Nucleo to the RPi, so I've made a manual connection. I have tried two different Rasperries (very old RPi 1 and a modern RPi 2 Zero W), with SPI and I2C, yet no success with either connection method with both RPIs.
I am providing +3.3 and 5V from the Rasperry to CN6, PowerLED on the Nucleo is on.
I checked after all my failed trials - others did make it the same way:
https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/st25r3911b-disco-to-raspberry-pi-not-working-using-same/m-p/228869
I am using the same mapping to the RPi pin header. Raspberry Pi Zero (latest Bullseye, Kernel 6.1.21-v7+ ) where "raspinfo" shows the SPI and I2C settings.
GPIO 2: level=1 fsel=4 alt=0 func=SDA1
GPIO 3: level=1 fsel=4 alt=0 func=SCL1
GPIO 7: level=0 fsel=0 func=INPUT
GPIO 8: level=1 fsel=1 func=OUTPUT
GPIO 9: level=0 fsel=4 alt=0 func=SPI0_MISO
GPIO 10: level=0 fsel=4 alt=0 func=SPI0_MOSI
GPIO 11: level=0 fsel=4 alt=0 func=SPI0_SCLK
I2C works with other devices.
GPIO 7/CE-1 is set in the boot/config.txt according to readme from the Linux driver: "dtoverlay=spi0-1cs".
I have set the solder bridge / 0 Ohm connector on the Nucleo for I2C_Enable accordingly to the case.
"sudo ./nfc_demo_st25r3916b"
"Welcome to the ST25R NFC Demo on Linux.
Scanning for NFC technologies..."
and stops in the loop with the LED on/blinking.
### I2C
If I switch to I2C, compile with the I2C-Flag, I2C_EN against VDD_D and 56k Pull-Ups on SDA and SCL (doesn't make a difference).
RPI-I2C boot-seeting settings from readme "core_freq = 250" and "dtparami2c_arm=on i2x_arm_baudrate=400000
"sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --"
The ST25R3916B is found on the I2C bus, which looks promising, yet
"Welcome to the ST25R NFC Demo on Linux.
Scanning for NFC technologies...
Open i2c bus /dev/i2c-1 for nfc successful
Set slave address of the sensor /dev/i2c-1 to (0x50) successful"
Again, after initialization it's stuck and the LEDs go on.
The LEDs indicate a problem with RFAL init. I don't have a logic analyzer here for further SPI debugging but since I2C is functional and found the ST25R3916B in combination with the LEDs on I can't help to think it's more of a driver/library problem...
Any ideas?
