Hi,
We are using AM335x based custom board. We have connected CLRC663 RFID card reader to the I2C lines. and we have integrated RFID NFC Reader Library in our application. everything works fine. We are able to read/write the Mifare Classic RFID card's memory. We have used the Discovery loop to detect the RFID card. below is the code snippet for that.
---------------------------------------------------------------------------------------------------------------
do
{
/* Field OFF */
status = phhalHw_FieldOff(pHal);
CHECK_STATUS(status);
/* Polling interval for the card detection */
sleep(1);
/* Configure Discovery loop for Poll Mode */
status = phacDiscLoop_SetConfig(pDiscLoop,
PHAC_DISCLOOP_CONFIG_NEXT_POLL_STATE,
PHAC_DISCLOOP_POLL_STATE_DETECTION);
CHECK_STATUS(status);
/* Run Discovery loop */
status = phacDiscLoop_Run(pDiscLoop,
PHAC_DISCLOOP_ENTRY_POINT_POLL);
/* Exit on Card detection */
} while ((status & PH_ERR_MASK) != PHAC_DISCLOOP_DEVICE_ACTIVATED);
---------------------------------------------------------------------------------------------------------------
Now, the problem is above code takes around 10% CPU usage.
Can you guys suggest to us, How we can reduce the CPU usage? Do we have any other method to detect the RFID card, other than the DIscovery loop?
Regards,
Sandip