Hi,
I'm working on NRF52 NFC and I meet an issue related to timing. I'm using hal_nfc_t2t driver directly (Without nfc lib) because I want to do some custom work and I'm using adafruit PN532 as reader.
I updated the hal_nfc_t2t driver with 2 minor patches:
- I remove this call: nfcSetInternal
- I updated NFCT_IRQHandler in order to forward all commands to my application layer (HAL_NFC_EVENT_DATA_RECEIVED) and not only READ messages.
Now, I'm sending some commands from my PN532 to my NRF52 which need some processing time (> 100 ms) and when I'm sending back data from my NRF52, the chipset seems never send any data (tx_fend is never called)
Of course, I setup the PN532 with a timeout bigger than this processing time, for my tests I setup it to 3.28s by setting the RFCONFIGURATION_CFGITEM_TIMING register and I also updated the driver provided by adafruit in order to increase timeouts
You can easily reproduce this issue with the examples provided by Nordic and add a nrf_delay(100) between a read command and the response (hal_nfc_send). You will also need to remove the NFC library and directly handle NFC commands.
I would like to know if I missed something ? I'm not able to understand where come from this issue. Is it an hardware issue or software ? Why do I need to reply in a very short time to HAL_NFC_EVENT_DATA_RECEIVED commands ?
I try to search some information in documentations, datasheet etc ... but I actually found nothing.
FYI, here are my logs from NRF52 side:
[077835] [NFC_HAL]: reinitialize
[077848] [NFC_HAL]: fielddetected
[077849] [NFC_HAL]: fielddetected
[077861] module_nfc_callback: event: HAL_NFC_EVENT_FIELD_ON
[077862] [NFC_HAL]: selected
[077883] module_nfc_callback: event: HAL_NFC_EVENT_DATA_RECEIVED
[077883] [NFC_HAL]: rx_fend
[077883] [NFC_HAL]: sending 64 Bytes (0x88, ...)
[081173] module_nfc_callback: event: HAL_NFC_EVENT_FIELD_OFF
- First number (between []) is the timing in milliseconds.
- [NFC_HAL] are the logs from original driver
- module_nfc_callback are the logs from my callback.
When everything is working (when send is invoked very quickly) I can see just after:
[077883] [NFC_HAL]: sending 64 Bytes (0x88, ...)
this line:
[....] [NFC_HAL]: tx_fend
Does anyone already met this issue ?
Thank you,
Thierry