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

nRF52832 - NFC stops working when SoftDevice is enabled

Hi,

I have a problem making NFC (with a simple text record) work when I enable SoftDevice: I do not receive any NFC event and NFC communication does not work.

I have a working project based on S332 (v5) using both BLE and ANT. The project does not have any know problems. I've added some trivial code for enabling NFC as per NFC text example, and it works only if I disable all SoftDevice related stuff. I've started removing all SD code and re-adding it line by line, and I've found the lines causing the problem are:

ret_code_t err_code = nrf_sdh_enable_request();
APP_ERROR_CHECK(err_code);

Just commenting the lines above and NFC works (obviously BLE/AND do not). I've also tried double checking and copying sdk_config.h but found nothing obvious. I've also tried adding my NFC code to BLE HRS examples and it works, so it must be something related to my project settings. I must be missing something but cant' find what. Any help would be appreciated.

Parents Reply Children
  • Pardon for the incomplete report:

    nRF52832 (on a PCA10040)

    SDK14.2.0

    Regarding workarounds, I think 2 are available:

    HAL_NFC_ENGINEERING_BC_FTPAN_WORKAROUND

    HAL_NFC_NRF52840_ENGINEERING_A_WORKAROUND

    And I have defined "BOARD_PCA10040" in my project, so it seems HAL_NFC_ENGINEERING_BC_FTPAN_WORKAROUND is enabled. Which workarounds should I use instead?

    Thanks!

  • Some additional info:

    NFCT_IRQHandler

    is triggere in both cases, but with SD enabled the text record is not sent and the nfc event handler is not triggered.

  • I confirm HAL_NFC_NRF52840_ENGINEERING_A_WORKAROUND is NOT enabled, HAL_NFC_ENGINEERING_BC_FTPAN_WORKAROUND instead IS enabled.

  • Ok. I see. No, I just wanted to check that you didn't have the HAL_NFC_NRF52840_ENGINEERING_ABC_WORKAROUND enabled, because this workaround contains a bug. 

    Actually, I am not sure exactly why it isn't working, but I know that the NFC has had a large number of bugfixes in the later SDKs. Is it too late for you to port to SDK15? (Preferably 15.2.0). The second option is to port only the NFC libraries to the ones from SDK15.2.0.

    If it is too late, is it possible to send your project, so that I can have a look?

    Best regards,

    Edvin

  • Hi Edvin,

    thanks for helping out. I can't switch to 15.2 since I need S332 and it is not supported in SDK15.x yet. I'll wait for 15.3 due out soon.

    Regarding NFC, what puzzles me is that it should work since I can make my NFC code work with the same SDK and the sample BLE HRS example (featuring S132). The problem is I can't trace any difference between my full project and the examples that can explain. Obviously something is wrong, but considering how sdk_config.h can become bloated, I may have missed something.

    In any case I can provide a sample project for you to examine. Where/how can I share it?

    Thanks a lot!

Related