Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf_drv and nrfx drivers

nRF5_SDK_16.0.0_98a08e2\examples\peripheral\uart. In the SDK 16 ,UART example,why the legacy driver nrf_drv_uart.c is used instead of the sdk recommended nrfx_uart.c.

Secondly, which takes priority in selecting drivers sdk_config.h or the source file and the includes.

Parents
  • Hello,

    In the SDK 16 ,UART example,why the legacy driver nrf_drv_uart.c is used instead of the sdk recommended nrfx_uart.c.

    This is correct, the example uses the legacy drivers - however you can find the similar or same functionality in the nrfx_uarte driver when implementing it yourself, it is described in the nrfx_uarte API reference.
    If you are starting development yourself, I recommend using the nrfx driver directly, to be compatible with future releases that does not include the nrf_drv.

    Secondly, which takes priority in selecting drivers sdk_config.h or the source file and the includes.

    The legacy files take priority, as can be read about in this ticket if their *_ENABLEs are defined - i.e it is not enough to just set the enables to 0, you must uncomment/remove them from your SDK config to avoid this. This behavior is known to cause some confusion, and our SDK team has been made aware of the issue.

    Best regards,
    Karl

     

Reply
  • Hello,

    In the SDK 16 ,UART example,why the legacy driver nrf_drv_uart.c is used instead of the sdk recommended nrfx_uart.c.

    This is correct, the example uses the legacy drivers - however you can find the similar or same functionality in the nrfx_uarte driver when implementing it yourself, it is described in the nrfx_uarte API reference.
    If you are starting development yourself, I recommend using the nrfx driver directly, to be compatible with future releases that does not include the nrf_drv.

    Secondly, which takes priority in selecting drivers sdk_config.h or the source file and the includes.

    The legacy files take priority, as can be read about in this ticket if their *_ENABLEs are defined - i.e it is not enough to just set the enables to 0, you must uncomment/remove them from your SDK config to avoid this. This behavior is known to cause some confusion, and our SDK team has been made aware of the issue.

    Best regards,
    Karl

     

Children
No Data
Related