Does the NFC library globally disable interrupts at any point? We're trying to track down an issue where our code occasionally misses an I2C event during NFC read/write.
Does the NFC library globally disable interrupts at any point? We're trying to track down an issue where our code occasionally misses an I2C event during NFC read/write.
Yes, the NFC library can globally disable interrupts through nrf_drv_clock module, look for CRITICAL_REGION_ENTER()
and CRITICAL_REGION_EXIT()
macros (using critical sections for RMW operations on driver's state variables). The nrf_drv_clock is used for controlling oscillators. NFC can only be enabled when a high precession crystal oscillator is running.
But even if IRQs are disabled, the I2C events should be set as pending and should fire when the interrupts are enabled again.
Yes, the NFC library can globally disable interrupts through nrf_drv_clock module, look for CRITICAL_REGION_ENTER()
and CRITICAL_REGION_EXIT()
macros (using critical sections for RMW operations on driver's state variables). The nrf_drv_clock is used for controlling oscillators. NFC can only be enabled when a high precession crystal oscillator is running.
But even if IRQs are disabled, the I2C events should be set as pending and should fire when the interrupts are enabled again.