Arm Mbed and Pelion Device Management support forum

NFCEEPROM: Interrupt handler

Hi,

I have a board with an ST M24SR NFC EEPROM and I’m attempting to use this driver. I’ve been looking at the code from this example and have managed to get everything working such that the example code writes an NDEF message using MessageBuilder and I can read the message with an NFC tag app on my phone.

I am however struggling to respond to interrupts. With an old library I’ve been able to achieve this in the past - but I’d like to use the new Mbed NFC API for many reasons.

Back to the new driver. I’ve noticed that _communication_type is set to SYNC in the init() function; however, the callback function to handle interrupts only handles _communication_type of ASYNC.

All I wish to do is for my CPU to read NDEF records from the M24SR when they are updated from an external source. Any pointers are greatly appreciated.

Thanks,
Adam

@Pekka01 Any insights?

:weary:

Hi Adam,

I got some feedback, please let me know if you have further question.

Async mode should work as well, we set sync mode for initialization.
If the pins to generate the interrupts are connected it will work in async mode

Regards,
Desmond