PN7150 doesn't work well with ESP-WROOM-32( Error occurs around RF_CONF)

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

PN7150 doesn't work well with ESP-WROOM-32( Error occurs around RF_CONF)

1,223 Views
ashijanken
Contributor I

I want to use PN7150 with ESP32, so I made some codes based on "NXP-NCI MCUXpresso example Project".
(I found it here: https://www.nxp.com/products/identification-security/rfid/nfc-hf/nfc-readers/pn7150-high-performance...)

However, PN7150 doesn't work well.

In the connecting phase, I run this code.

/* Open connection to NXPNCI device */
if (NxpNci_Connect() == NFC_ERROR) {
    printf("Error: cannot connect to NXPNCI device\n");
    while(1){
        sys::delay_ms(10);
    }
}
if (NxpNci_ConfigureSettings() == NFC_ERROR) {
    printf("Error: cannot configure NXPNCI settings\n");
    while(1){
        sys::delay_ms(10);
    }
}

if (NxpNci_ConfigureMode(mode) == NFC_ERROR)
{
    printf("Error: cannot configure NXPNCI\n");
    while(1){
        sys::delay_ms(10);
    }
}

the error occurs in NxpNci_ConfigureSettings() function.

it occurs in the section below in this function.

#if NXP_RF_CONF
    NxpNci_CONF = NULL;
    if(gNfcController_generation == 1)
    {
        NxpNci_CONF = NxpNci_RF_CONF_1stGen;
        NxpNci_CONF_size = sizeof(NxpNci_RF_CONF_1stGen);
    }
    else if(gNfcController_generation == 2)
    {
        NxpNci_CONF = NxpNci_RF_CONF_2ndGen;
        NxpNci_CONF_size = sizeof(NxpNci_RF_CONF_2ndGen);
    }
    if (NxpNci_CONF != NULL)
    {
        isResetRequired = true;
        NxpNci_HostTransceive(NxpNci_CONF, NxpNci_CONF_size, Answer, sizeof(Answer), &AnswerSize);
        if ((Answer[0] != 0x40) || (Answer[1] != 0x02) || (Answer[3] != 0x00) || (Answer[4] != 0x00)) return NXPNCI_ERROR;
    }

#endif

When the ESP sends NxpNci_RF_CONF_2ndGen commands(related post), then PN7150 returns a packet as below:

0x40 0x02 0x0C 0x09 0x05 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D

Another PN7150 returns a different packet even though ESP's firmware is the same. (It is strange behavior, but it may be just because it is broken)

0x40 0x02 0x16 0x09 0x0A 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D 0xA0 0x0D

I tried to understand the meaning of them with "PN7150 User Manual" (https://www.nxp.com/docs/en/user-guide/UM10936.pdf), but what I understood was that they were (response type of) control packets.
I couldn't find corresponding commands to the PN7150's response.

Now, my questions are as below:
1. What is the meaning of these packets?
2. How do I fix this error?

Thank you in advance.

0 Kudos
1 Reply

1,021 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

I would strongly recommend you to register in the NFC Forum and get the NCI Specification as you will find the complete meaning of the different messages. 

Also, you will need to check if your migration was correctly done, do you have the same issue when using our MCUS? 

Regards, 
Estephania 

0 Kudos