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

nRFx SDK 15 Upgrade Suggestions

I'm following the migration guide from SDK 14.2 to SDK 15, and am a little hung up on the new nRFx module.

All the examples in the new SDK use the legacy drivers but the migration guide suggests moving to the new nRFx API. 

I'm having a few problems with moving i2c and SPI to the new platform, and am wondering if I should just stick to the legacy, or if that is planned to be deprecated soon, and I would have a smoother transition by approaching the new platform now.

The lack of new nRFx examples in the SDK leads me to believe the legacy drivers are going to stick around for a while. But, I could be wrong!

The errors I'm running into are almost identical to this thread: devzone.nordicsemi.com/.../126069

Any input would be appreciated,

Jeff

  • All the examples in the new SDK use the legacy drivers

    I think almost all the examples are using the nrfx drivers. There is just a legacy-layer that translates from the old API to the new API. The legacy drivers are not actually included in the SDK at all.

    From the release notes:

    Added the nrfx project as a set of default drivers and provided a legacy layer for supporting deprecated API.

    ** Drivers and libraries **
     - The way peripheral drivers are handled in the SDK has been reorganized:
         - Replaced existing drivers with the "external" drivers from nrfx project. See github.com/.../README.md for more information on nrfx.
         - New drivers from nrfx are located in "..\modules\nrfx".
         - Drivers replaced by nrfx are removed from "..\components\driver_nrf".
         - A glue layer is added to make the nrfx driver compatible with SDK and the SoftDevice.
  • I'm not sure if you are correct that the example from Nordic doesn't include the legacy layer for all the peripheral drivers...

    I'm also currently migrating my project from SDK14.2 to SDK15. I started with using the legacy layer for GPIOTE and my project worked more or less stable. Unfortunately Nordic's migration guide recommends using the new nrfx drivers because the legacy layer could be removed in one of the next SDK releases. When I remove the nrf_drv_gpiote setting in sdk_config.h nothing works any more and the compiler can't find the definition of nrfx_gpiote_init (include path is correct and nrfx_gpiote.c is added to the project)

    To be sure that there is nothing wrong with my setup, I took one of the different examples of Nordic and removed the nrf_drv_gpiote setting. I changed app_button.c in order to include directly nrfx_gpiote.h and replaced the different nrf_drv_gpiote functions by the same from nrfx_gpiote. And the result is exactly the same. I get a linker error:

    nrf52840_xxaa_axf: Error: L6218E: Undefined symbol nrfx_gpiote_in_event_disable (referred from app_button.c)

    Is there any doc from Nordic's side how we can change properly from SDK14 to SDK15 and using directly the nrfx drivers?

  • Hi All, 

    Same problem was reported in this thread: https://devzone.nordicsemi.com/f/nordic-q-a/34317/undefined-reference-to-nrfx_twi_tx. The solution is to remove relevant legacy definitions from the sdk_config header in order to prevent NRFX_* defines from being overridden by the nrfx legacy adaption layer. SDK documentation will be updated.

Related