I have trouble getting NFC-pairing to work in nRF52840 running SoftDevice 7.2 based on SDK 7.0.2.
The observed behaviour is that the NFC Field is detected but nothing more.
My RTT log looks like this:
<info> NFCT: Start <debug> NFCT: Field detected <debug> nfc_platform: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected
while the nfc pairing reference example works flawlessly, the debug output looks like that:
<info> NFCT: Initialized <info> NFCT: Start <info> app: NFC Connection Handover BLE peripheral device example started. <debug> NFCT: Field detected <debug> nfc_platform: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field lost <debug> nfc_platform: Field lost <debug> NFCT: Field detected <debug> nfc_platform: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> NFCT: Field lost <debug> nfc_platform: Field lost <debug> NFCT: Field detected <debug> nfc_platform: Field detected <debug> NFCT: Field detected <debug> NFCT: Field detected <debug> nfc_ble_pair: NFC_EVENT_FIELD_ON <info> BLE_M: Fast advertising. <debug> NFCT: Selected <debug> NFCT: Rx fend <debug> NFCT: Selected
After some digging (and reading nrf52840 datasheet), I figured that the reason might be
missing nfc module getting set in active mode.
In nfc_platform.c that happens by calling nrfx_nfct_state_force(NRFX_NFCT_STATE_ACTIVATED);
commenting out that line and running the nfc-example again shows the same behaviour
(and debug-output) as with my app.
Debugging my app again reveals that the clock_event_handler in nfc_platform.c that would ACTIVATE NFC is never
called and neither is the nrfx_power_clock_irq_handler called.
Comparing SDK configurations between my Application and the nfc pairing example shows
no differences in CLOCK configuration or NFC-configuration. Also, both have SoftDevice active and both NRFX_CLOCK_ENABLED
as well as NRF_CLOCK_ENABLED set as well..
I would expect the SoftDevice to forward the IRQ to the application but it doesn't.
It looks to me as if joel-sc is facing the same problem here:
So, can anyone give me a hint to why the clock IRQ is not raised (or rather forwarded) by the SoftDevice?
Thank you very much.