This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Does the NFC Type 4 library globally disable interrupts at any point?

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.

Parents
  • 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.

Reply
  • 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.

Children
No Data
Related