PN7160 DPC check

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

PN7160 DPC check

Jump to solution
22,185 Views
Alb
Contributor I

Hi,

I'm trying to setup dpc on pn7160 (AN13224) but when I select "12"->DPC Check on "NfcFactoryTestApp" I get the answer "Error, cannot get parameter value". Buffer received is 4F 3F 01 09. Can you tell me which is the reason of failure and most important where I can find this info in nxp docs?

Thanks

Alberto

 

0 Kudos
Reply
1 Solution
21,642 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello mark_tang, 

I see your PN7160 FW version is 12.50.05

Tomas_Parizek_0-1688464972452.png

As Alberto has mentioned, the DPC Check has been added from version 12.50.06.

Tomas_Parizek_1-1688465061525.png

I am sorry that I overlooked this fact. I assumed that the FW you have is 06 or higher. 

So the DPC is working but the DPC command is not supported for the 05 FW version. 

The FW update can be done as described here: 

The latest FW, you can find it here -> https://github.com/NXP/nfc-NXPNFCC_FW/tree/master/InfraFW/pn7160

More description of how to do the FW update is available in PN7160 FAQ document -> 19 FW update

https://www.nxp.com/docs/en/application-note/AN13892.pdf 

BR

Tomas 

 

 

View solution in original post

28 Replies
739 Views
user_ahmed
Contributor I

@Tomas_Parizek  hi tomas can i ask you if i need to connect pn7161 with mcu like esp32 where can i found library and how can adjust dpc on it 

0 Kudos
Reply
215 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello @user_ahmed , 

We do have only examples for NXP MCU. So the porting to your MCU has to be done by your own. 

 However I can recommend to check the following docuemtns: 

PN7160 Linux porting guide -> https://www.nxp.com/docs/en/application-note/AN13287.pdf

PN7160 Android porting guide -> https://www.nxp.com/docs/en/application-note/AN13189.pdf

and MCU Xpresso example: https://www.nxp.com/docs/en/application-note/AN13288.pdf

BR

Tomas 

 

 

 

0 Kudos
Reply
20,102 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alb, 

Can you try the same with the code I attached, please? It should be the same as we used in AN13224. 

You can just replace it in the linux_NfcFactoryTestApp folder as shown below: 

Tomas_Parizek_0-1687498972100.png

 

BR

Tomas 

 

0 Kudos
Reply
20,086 Views
Alb
Contributor I

Hi Tomas,

I compared the source code and it's almost the same (some time stamp difference and the content of "GetNciParam").

I compiled app you gave me and I have the same result selecting "DPC" item -> "Error, cannot get parameter value". Buffer from device is the same I got using my app: 4F 3F 01 09

Alberto

0 Kudos
Reply
20,073 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alb,

Thanks for your feedback! And what about the "Get current value", does it work?

Could you also check what you have written in the EEPROM in A00B (DPC) register, please?

Tomas_Parizek_0-1687503511099.png

BR

Tomas 

0 Kudos
Reply
20,045 Views
Alb
Contributor I

Hi Tomas,

get current always worked (109mA), I put the value in excel file from NXP to compute DPC command and I set it using "Set proprietary paramter"

20 02 5B 01 A0 0B 57 F3 13 90 09 0F 4E 0F 7C 95 B7 AA 7C 9F A7 99 A1 9F 97 99 B3 9F 97 99 B7 9F 97 00 C9 9F 07 00 CD 9F 07 00 DF 9F 07 00 E7 9F 07 00 F5 9F 07 00 F9 9F 07 00 0B 9F 04 00 0F 9F 04 00 21 9F 04 00 25 9F 04 00 37 9F 02 00 46 9F 00 00 51 9F 00 00 63 9F 00 00 76 9F 00 00

and software answer is "Proprietary parameter successfully set" so everything seemes to go well till this step. This is what I have reading DPC register

F3 13 90 09 0F 4E 0F 7C 95 B7 AA 7C 9F A7 99 A1 9F 97 99 B3 9F 97 99 B7 9F 97 00 C9 9F 07 00 CD 9F 07 00 DF 9F 07 00 E7 9F 07 00 F5 9F 07 00 F9 9F 07 00 0B 9F 04 00 0F 9F 04 00 21 9F 04 00 25 9F 04 00 37 9F 02 00 46 9F 00 00 51 9F 00 00 63 9F 00 00 76 9F 00 00

It's the same data. Even changing a little bit antenna matching and setting different value for the current has the same result: DPC Check can not extract values.

Thanks

Alberto

0 Kudos
Reply
20,009 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alberto, 

Ok, that is strange. 

Can we confirm that the DPC really works?

You need to measure VDD(TX) voltage (pin 14 on the QFN package). Once you put a piece of metal or a PICC to the antenna proximity, you should see that this voltage will be regulated. 

Can you check that, please? 

BR

Tomas 

0 Kudos
Reply
19,994 Views
Alb
Contributor I

Hi Tomas,

to be honest I'don't see any limitation. I put the device in discovery mode (item 2 of nfc app) and I see periodic peak at 5V but Vdd(tx) seems the same that I have disabling DPC (command 20 02 5B 01 A0 0B 57 10 10 90 72 0F 4E 00 3F 95 B7 AA 3F 9F A7 99 52 9F 97 99 5B 9F 97 99 5D 9F 97 00 66 9F 07 00 68 9F 07 00 72 9F 07 00 75 9F 07 00 7D 9F 07 00 7F 9F 07 00 88 9F 04 00 8A 9F 04 00 93 9F 04 00 95 9F 04 00 9E 9F 02 00 A6 9F 00 00 AB 1F 00 00 B5 1F 00 00 BE 1F 00 00). I used also "RF continous mode" but the voltage is 5V stable. 

I detuned a little bit the board to use more current (now without load it's 180mA using "get current" form app instead of 109mA) but I don't see limitation. As you saw the eeprom has the value I set so I tought that dpc was on but mayble not.....

I attach the excel file with setup for DPC so maybe it's easy for you to see a mistake. My VDD is 5V: do I have to setup lines 24-25-26 in "LUT GENERATOR" sheet in excel file? Can it be the reason that dpc seems to be off?

 

Thanks and regards

Alberto

 

0 Kudos
Reply
19,732 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alberto, 

 

Could you share your "NfcFactoryTestApp.c" code, please? 

 

BR

 

Tomas 

0 Kudos
Reply
19,718 Views
Alb
Contributor I

Hi Tomas,

I'm using the code you sent me a couple of weeks ago (I just added lines from 371 to 378 to show device answer buffer of DPC Check command).

regards 

Alberto 

0 Kudos
Reply
19,700 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alberto, 

OK, thanks! 

It is very interesting. I just took a fresh Linux environment + the code you just gave me (to avoid some differences) 

I put the same DPC values to the EEPROM and I can still get something out of DPC check. 

Tomas_Parizek_0-1688457964989.png

What if you just press "CTR+c" which restarts the app and try it again? Do you get the same issue still? 

BTW. Are you using A1 (I2C) version or B1 (SPI) of PN7160? 

BR

Tomas 

0 Kudos
Reply
19,689 Views
Alb
Contributor I

Hi Tomas,

same result restarting app or writing "FF" to come back from "DPC Check" to main menu. I'm using PN7160 i2c version and app is running on raspeberry. I attach the picture of the device: maybe wrong fw or some defective batch?

regards 

Alberto

0 Kudos
Reply
19,678 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alberto, 

Ok, thanks! The IC FW should be the same on my side. 

What about the "libnfc-nxp.conf". Can you share this file, please? I would like to compare our settings.#

You find it in the conf directory.  

Tomas_Parizek_0-1688461101667.png

BR

Tomas 

0 Kudos
Reply
19,674 Views
Alb
Contributor I

Hi Tomas,

maybe I found the problem: is "DPC CHEKC" (pag 17 in "AN13224.pdf") what you call "dpc helper" (pag 6 of in "PN7160_PN7161.pdf")?

Dpc helper seems to be available only as a firmware update (12.50.06). This is what nxp wrote: Production samples will have 12.50.05 firmware.

Does "production samples" means first available samples for this product or mass production?

If it's mass production there are no devices with 12.50.06 and dpc helper is not available without fw upgrade. Let me know

regards

Alberto

0 Kudos
Reply
19,665 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alberto, 

You can check your FW version.

1. Set all "logs" to 0x03 as shown below (in libnfc-nxp.conf) 

Tomas_Parizek_0-1688463595519.png

1.1 save it and do "make" and "sudo make install" 

2. Run an example -> e.g. ./nfcDemoApp poll

Tomas_Parizek_1-1688463621489.png

3. Search for the FW version 

Tomas_Parizek_2-1688463652803.png

BR

Tomas 

 

 

0 Kudos
Reply
19,612 Views
Alb
Contributor I

Sorry,

Now I found it: 12.50.5 so no dpc chekc at all

0 Kudos
Reply
19,603 Views
Tomas_Parizek
NXP Employee
NXP Employee

You can update it to a newer version. 

The FW you can find it here -> https://github.com/NXP/nfc-NXPNFCC_FW/tree/master/InfraFW/pn7160

More description of how to do the FW update is available in PN7160 FAQ document -> 19 FW update

https://www.nxp.com/docs/en/application-note/AN13892.pdf

BR

Tomas 

0 Kudos
Reply
19,969 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Alberto, 

Thanks for your feedback! 

The Excel sheet looks OK from my point of view. I am sorry I did not give you full instructions on how the check the DPC on VDD(TX) line. 

The DPC is "visible" only after "NFC tag activation" -> In the NFC Factory test app, you need to go for option number  2 -> Functional Mode. Then place an NFC Card in the proximity and then check the VDD(TX) voltage. Once the NFC Card is still in the proximity you can approach a piece of metal and check the VDD(TX). You should see that this voltage will change. 

I would like to confirm whether the DPC works or not. If yes, we need to check the NCI communication why the DPC check does not work. We tested the code I gave you on a different PN7160 sample, it was also working. 

BTW. I will contact you via email and we can schedule a call and check your issue. 

 

BR

Tomas  

 

 

 

0 Kudos
Reply
19,959 Views
Alb
Contributor I

Hi Tomas,

I did the check with metal but I don't see any difference. I attach pictures so maybe you can check if you see something. BTW device reads the tag even with a big piece of metal on top.

My Vdd is 5V: could the problem be that in excel file I didn't enable lines 24-26 in "LUT GENERATOR" sheet?

Regards

Alberto

 

Tags (1)
0 Kudos
Reply
20,144 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @Alb 

 

I would suggest you check AN13892: PN7160 FAQ.

Chapter 4:  DPC configuration.

please check the parameters mentioned in this chapter.

 

Regards

Daniel

0 Kudos
Reply