2023-05-05 02:12 PM
I have program for CAN bus and NFC08a1 but when i combine i get several errors. All i want to do is get the reading from the nfc reader and send them on can. does anyone know how to do that?
Solved! Go to Solution.
2023-05-22 06:50 AM
Issue solved.
To ensure that the compiled driver meets the user intended device, it is required to add a pre-processor instruction defining the targeted ST25R device (e.g. ST25R3916B).
This needs to be globally defined as a compiler define (i.e. the RFAL source code should ***not**** be modified to add this define at source file level).
BT
2023-05-11 05:41 AM
Hi,
can you elaborate on your issue:
Rgds
BT
2023-05-11 07:16 AM
I am using l476rg board. I have nfc08a1 working and can bus work separately when i combine the code nothing works. I dont know why. The nfc08a1 wont work at all. I made sure the clock configuration is all good. I am using mcp2551 transceiver for can bus but nothing else. I am not getting any error the code compiles and everything.
2023-05-11 07:55 AM
Hi,
do you use ST X-CUBE-NFC6 FW package? if yes, can you recompile with ST25R_SELFTEST being defined and check the return code of st25r3916Initialize function?
Also can you connect a logic analyzer on SPI (CLK/MOSI/MISO/CS) + IRQ_3916 and provide a trace?
Rgds
BT
2023-05-11 08:05 AM
Yes indeed that is the library package i have been using. Where in the program do you want me to define selftest? in the main function? Yes i can connect the logic analyzer on the spi and interrupt pins.
2023-05-11 08:12 AM
Hi,
just add ST25R_SELFTEST in the list of preprocessor defines in the compiler configuration of your IDE
Rgds
BT
2023-05-11 08:35 AM
I did it. Still no difference. I have no errors like i expected but nothing on the nfc08a1.
2023-05-11 02:16 PM
Hi,
you mean: st25r3916Initialize returns ERR_NONE?
Can you elaborate on your code using the RFAL:
Can you set a breakpoint in rfalFieldOnAndStartGT and check the return code?
Using an oscilloscope, can you probe the RF field? (just connect the GND of the probe to the tip of the probe and put the probe on the antenna and you should be able to capture the field)
Can you provide a logic analyzer trace (SPI+IRQ)?
Rgds
BT
2023-05-11 03:52 PM
Hey Brian, YEs the code is based on pollingdetectndef.. I put the logic analyzer on spi and irq no data at all. It acts like as though Spi is not initialized even i did. I can send you my entire code. do you have an email address? I am super new to cubeide and this is my very first project.
2023-05-12 01:11 AM
Hi,
if the SPI is not initialized, it is unlikely that st25r3916Initialize() returns ERR_NONE (as st25r3916Initialize is supposed to read the IC Identity over SPI...). I would suggest to check the logic analyzer connection to the X-NUCLEO-NFC08A1 (e.g. GND pin...).
Rgds
BT