Hi!
We are planning on doing RF testing on the board that incorporates RFID periphery and need to output via console the state of the MIFARE card (present/not present) each second.
I'm writing to the console from the PresenceCheck function that pools the card. See the function below.
The issue is, that after arbitrary amount (sometimes it's 5 seconds, sometimes it's 4 minutes) of time the IC informs microcontroller that the card has been removed even though it's still »connected«.
I've seen this post: https://community.nxp.com/t5/NFC/Intermittent-presence-check-failures-on-PN7150/m-p/1227999
And I also tried changing the parameter of the CLIF_ANA_RX_REG -> RF_CLIF_CFG_BR_106_I_RXA_P (0xA0, 0x0D, 0x04, 0x34, 0x44, 0x20, 0x00,) from 0x22 to 0x20 which does not seem to do anything substantial.
So one of my questions is, from this application note: https://www.nxp.com/docs/en/application-note/AN11755.pdf on the page 62 where there is info about CLIF_ANA_RX_REG , I probably should change RX_GAIN parameter to make it more stable, did I even change the correct parameter, or is there anything else that could be the issue here?
Thanks for your time,
Kristjan
case PROT_MIFARE:
{
uint32_t sec = 0;
uint32_t min = 0;
uint32_t time_now = pdTICKS_TO_MS(xTaskGetTickCount());
uint32_t period = 1000;
uint32_t scan_time_now = pdTICKS_TO_MS(xTaskGetTickCount());
uint32_t scan_period = 500;
uint32_t removed_ms = 0;
do
{
//DelayMs(1000);
uint32_t time = pdTICKS_TO_MS(xTaskGetTickCount());
if(time >= time_now + period){
uint32_t milliseconds = time;
sec = milliseconds / 1000;
milliseconds %= 1000;
min = sec / 60;
sec %= 60;
printf("Card is present. ");
printf("Timestamp: %02d:%02d:%d \n", min, sec, milliseconds);
time_now += period;
}
// check if card was removed each 100ms
if(time >= scan_time_now + scan_period){
removed_ms = time;
/* Deactivate target */
pn7150_writeData(NCIDeactivate, sizeof(NCIDeactivate));
getMessage(5);
getMessage(100);
/* Reactivate target */
pn7150_writeData(NCISelectMIFARE, sizeof(NCISelectMIFARE));
getMessage(5);
getMessage(100);
scan_time_now += scan_period;
}
} while ((rxBuffer[0] == 0x61) && (rxBuffer[1] == 0x05));
uint32_t seconds = removed_ms / 1000;
removed_ms %= 1000;
uint32_t minutes = seconds / 60;
seconds %= 60;
printf("Card removed at: %02d:%02d:%d \n", minutes, seconds, removed_ms);
break;
}
Hello,
For the setting CLIF_ANA_RX_REG. One may refer to the SW4325 as the link.
Have a nice day.
-------------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------