PN7150 RF Timeout

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

PN7150 RF Timeout

1,546 Views
matsge
Contributor II

Hi

I'm currently testing out the PN7150S NFC controller for a project.

For intial testing we're using the OM5578 dev. module with a Raspberry Pi running the linux_libnfc-nci stack (R2.4).

I'm currently integrating support for a rather proprietary NFC temperature sensor over ISO14443.

To read out the temperautre, the process is as follws:

#1 - Send 'start measurement process' command to the NFC chip

#2 - Wait > 400 ms.

#3 - Send 'read measurement result" command to the NFC chip and receive the temperature.

The communications is achieved using the nfcTag_transceive() function provided by linux_libnfc-nci.

My current issue is that during the > 400 ms wait period, the NFC chip disables it's RF interface.

This in turn causes the controller/stack to disable the RF field and restart the polling process (looking for tags).

When the field is lost, the NFC chip shuts down and the process needs to be restarted.

Searching the PN7150 user manual i found the 'TO_RF_OFF_CFG' parameter which "Specifies the time out (inms) applied by PN7150before it restarts a Polling sequence, after it has detected a Field OFF in Listen Mode".

Would increasing the value of this parameter from the default 300ms help with my issue?
If so, is there any way to change this setting trough linux_libnfc-nci configuration file or function?

Labels (2)
4 Replies

1,332 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

NCI defines the TOTAL_DURATION parameter for that purpose, please refer to the following for details.

pastedImage_1.png

To increase this time TOTAL_DURATION parameter must be extended. In NXP-NCI_example code this is done in this declaration:

/* NCI standard dedicated settings

* Refer to NFC Forum NCI standard for more details

*/

uint8_t NxpNci_CORE_CONF[]={0x20, 0x02, 0x05, 0x01,         /* CORE_SET_CONFIG_CMD */

    0x00, 0x02, 0xF4, 0x01                                  /* TOTAL_DURATION */

};

Here TOTAL_DURATION is set to 0x01F4 = 500ms.

Hope that helps,

Have a great day,
Kan

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,332 Views
matsge
Contributor II

Thanks @Kan_Li

That seems reasonable.


Is there a way to set these configuration params in user space trough the linux-libnfc_nci stack?

I found these parameters in the libnfc-nxp-pn548.conf file, but I am unsure of the mapping.

Do these params relate to the NxpNci_CORE_CONF[] params in your post?

# Core configuration settings
NXP_CORE_CONF={ 20, 02, 2B, 0D,
    28, 01, 00,
    21, 01, 00,
    30, 01, 08,
    31, 01, 03,
    33, 04, 04, 03, 02, 01,
    54, 01, 06,
    50, 01, 02,
    5B, 01, 00,
    60, 01, 0E,
    80, 01, 01,
    81, 01, 01,
    82, 01, 0E,
    18, 01, 01
}

0 Kudos

1,332 Views
Kan_Li
NXP TechSupport
NXP TechSupport

No. There is another way to set up this parameter.

TOTAL_DURATION can be set within libnfc-nci.conf file using “NFA_DM_DISC_DURATION_POLL” parameter.

For instance, defining “NFA_DM_DISC_DURATION_POLL=256” will configure TOTAL_DURATION to 256ms.

Hope that helps,

Have a great day,
Kan

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,332 Views
matsge
Contributor II

Hi

I was forced to change my focus for a while, but now my attention is back on this project.


I was able to make this work by changing the DEFAULT_PRESENCE_CHECK definition in <nativeNfcTag.cpp> in the linux_libnfc-nci library.

 //default general trasceive timeout in millisecond
 #define DEFAULT_GENERAL_TRANS_TIMEOUT  2000
-#define DEFAULT_PRESENCE_CHECK_MDELAY 125
+#define DEFAULT_PRESENCE_CHECK_MDELAY 300


Posting here for future reference if someone has the same issue.

Thanks for you help. It put me on the right path.

0 Kudos