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

NFC nfc_t4t_setup returns NRF_ERROR_INVALID_STATE on nRF5 SDK v17.0.0 (worked on 14)

Hello,

I'm running into an issue after upgrading my SDK from  nRF5 SDK v14.2.0 to nRF5 SDK v17.0.0 .

We are using NFC periodically, where emulation is started and stopped.

Every time Emulation is started the following sequence is called:

err_code          =  nfc_t4t_setup(nfc_callback, NULL);
APP_ERROR_CHECK(err_code);
nfc_t4t_emulation_start();
d_nfcEmuStarted++;

Every time Emulation is stopped the following sequence is called:

d_nfcEmuStarted--;
nfc_t4t_emulation_stop();
nfc_t4t_done();

If NFC is started, and stopped once, subsequent calls to "nfc_t4t_setup(...)" return NRF_ERROR_INVALID_STATE . I've ensured "d_nfcEmuStarted" is 0, and with an NFC reader that Emulation is indeed stopped.

Is there an extra step I'm missing? It doesn't look like emulation is ever stopped in any of the Nordic Demos, so I don't have anything to compare to. This worked correctly with SDK 14

Related