2025-04-10 5:31 AM - last edited on 2025-04-11 12:14 AM by Andrew Neil
Hi, I am using a customer board with h7. Similarly, I want to read a simple nfc card using the st25r3916 chip. For this, I made the necessary adjustments using RFAL libraries without using the cubeMx ready package.
I have completed the necessary hardware and software processes for SPI, interrupt and IRQ.
Sometimes it completes the initial step successfully, sometimes the ID is wrong (st25r3916ReadRegister) and it gives an error. (In fact, when you look at the mosi line, you can see that something is not right)
Mosi keeps changing even though I haven't changed the functions. It doesn't make any sense..
SPI1 Config :
CPOL : Low
CPHA : 2 Edge
I am using pg15 pin for IRQ and spi1 for connections.
NVIC settings:
Solved! Go to Solution.
2025-04-15 5:39 AM
Hi,
in both initialOkey and InitialProblem, one can see glitches on the CS:
initialOkey:
InitialProblem:
I would suggest to check the HW connection between the MCU and ST2R3916. Can you share some details about your Hardware setup: do you use wire jumpers between the MCU and the ST25R3916? Make sure the GND is properly connected.
Rgds
BT
2025-04-10 11:53 PM
Hi,
not sure what you mean. Of course when you send data over SPI it will appear on MOSI. Or do you see un-intended toggling? Unfortunately the screen shots don't allow to check/interpret the signals as too coarse. I see some glitches on CS. Likely artifacts - better to twist the cables a bit and enable the glitch filter.
You can also just share the trace files from Saleae.
BR, Ulysses
2025-04-13 10:00 PM
When I step through my code in debug, the chip ID is read successfully and the module is started, but when it is running in full run, the chip ID cannot be read and it gives an error. This is inconsistent, when I reset the code, sometimes it works and sometimes it doesn't.
I am sharing Saleae data.
2025-04-15 5:39 AM
Hi,
in both initialOkey and InitialProblem, one can see glitches on the CS:
initialOkey:
InitialProblem:
I would suggest to check the HW connection between the MCU and ST2R3916. Can you share some details about your Hardware setup: do you use wire jumpers between the MCU and the ST25R3916? Make sure the GND is properly connected.
Rgds
BT