PN5190 NfCRdLib - Problems with NfcrdlibEx1_DiscoveryLoop

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN5190 NfCRdLib - Problems with NfcrdlibEx1_DiscoveryLoop

539 Views
jr_hernandez
Contributor II

Hi,

I am facing some troubles when running the NfcrdlibEx1_DiscoveryLoop example.

I have ported myself to ESP32 and using NullOs mode fo OS layer by now.

The P5190 seems to boot correctly and starts LPCD (see SPI frames below).

DiscoveryLoop Example:

-DEBUG-: [ 0,300 s] SPI WR >> 0x 7F 20 01 00
-DEBUG-: [ 0,319 s] SPI RD << 0x FF 80 00 08
-DEBUG-: [ 0,338 s] SPI RD << 0x FF 01 00 00 00 01 00 00 00

PN5190 Booted correctly

-DEBUG-: [ 0,353 s] phNfcLib_GetDataParams...
-DEBUG-: [ 0,390 s] SPI WR >> 0x 7F 06 00 1A B3 02 04 00 A1 A2 A3 40 01 FE B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 23 45
-DEBUG-: [ 0,423 s] SPI RD << 0x FF 06 00 01 00 FF FF FF FF
-DEBUG-: [ 0,438 s] SPI WR >> 0x 7F 06 00 03 CB 02 01
-DEBUG-: [ 0,465 s] SPI RD << 0x FF 06 00 01 00 FF FF FF FF
-DEBUG-: [ 0,480 s] SPI WR >> 0x 7F 02 00 05 03 FE FF FF FF
-DEBUG-: [ 0,508 s] SPI RD << 0x FF 02 00 01 00 FF FF FF FF
-DEBUG-: [ 0,523 s] SPI WR >> 0x 7F 11 00 00
-DEBUG-: [ 0,550 s] SPI RD << 0x FF 11 00 01 00 FF FF FF FF
-DEBUG-: [ 0,655 s] SPI WR >> 0x 7F 23 00 08 02 00 00 00 00 00 64 00
0x FF 23 00 01 00 FF FF FF FF
-DEBUG-: [ 0,713 s] SPI RD << 0x FF 80 00 08 00 02 00 00 E6
-DEBUG-: [ 0,738 s] SPI RD << 0x FF FF C6 FF
-DEBUG-: [ 0,755 s] SPI WR >> 0x 7F 02 00 05 03 FE FF FF FF
-DEBUG-: [ 0,782 s] SPI RD << 0x FF 02 00 01 00 FF FF FF FF
-DEBUG-: [ 0,798 s] SPI WR >> 0x 7F 02 00 05 08 F7 FF FF FF
-DEBUG-: [ 0,825 s] SPI RD << 0x FF 02 00 01 00 FF FF FF FF
-DEBUG-: [ 0,842 s] SPI WR >> 0x 7F 23 00 08 03 00 E6 FF C6 FF 4A 01
-DEBUG-: [ 0,871 s] SPI RD << 0x FF 23 00 01 00 FF FF FF FF

But as soon as a card is placed on field it tries some active poll and nothing is reported.

It performs several SPI transfers and the remains with RF off.

Any idea?

Regards, Ramon.

 

 

0 Kudos
1 Reply

526 Views
jr_hernandez
Contributor II

Hi again,

I have detected an issue in the SPI transfer when placing the card and the command EXCHANGE_RF_DATA is executed:

jr_hernandez_0-1664365397936.png

According to the TLV scheme the received frame is 0x0D = 13 bytes long, but only 9 are expected when SPI exchange is invoked. This length is set internally in the NfcLib, right?

Why is this happening?

Regards, Ramon.

 

0 Kudos