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

Are there any examples to program the nrf52 at a lower level bypassing all the bloat/ 10 layers of abstraction in the SDK? TIA.

Are there any examples to program the nrf52 at a lower level bypassing all the bloat/ 10 layers of abstraction in the SDK? TIA.

I often hear that things were more straight forward in the old SDKs ( ver 9 or so). can someone with experience in those please chime in?

  • Hello Edwin, 

    Thanks, your previous responses have helped me understand the sdk_config.h a bit better. I was able to get UART working. I believe UART 0 instance was not enabled. I've also come up with a few ways to work around the sdk_config.h without going bare-metal and still reusing much of the nrf driver and library work. 

    Thank you and to your colleagues for your help. This can be closed out.  

  • I guess it is also worth mentioning a file that may confuse even more, which is the apply_old_config.h. You should at least look at it. When the nrfx drivers were introduced, they added these new NRFX_... definitions in sdk_config.h, which are used in the drivers. However, even though you set them in sdk_config.h, they will be overwritten in apply_old_config.h, to the value that the non-NRFX definitions are set to. Just look at the file, and you should see how it does this. Either, you need to use the "legacy" definitions, or you need to remove them and use the NRFX definitions. (It is the same drivers that are used either way). This may cause confusion, because setting:
    NRFX_UART0_ENABLED to 1 may be undone because UART0_ENABLED was set to 0, and this part from apply_old_config:

    #if defined(UART_ENABLED)
    
    #undef NRFX_UART_ENABLED
    #define NRFX_UART_ENABLED   (UART_ENABLED && NRFX_UART0_ENABLED)
    #undef NRFX_UARTE_ENABLED
    #define NRFX_UARTE_ENABLED  (UART_ENABLED && (NRFX_UARTE0_ENABLED || NRFX_UARTE1_ENABLED))
    
    #if defined(UART0_ENABLED)
    #undef NRFX_UART0_ENABLED
    #define NRFX_UART0_ENABLED   (UART0_ENABLED && UART_LEGACY_SUPPORT)
    #undef NRFX_UARTE0_ENABLED
    #define NRFX_UARTE0_ENABLED  (UART0_ENABLED && UART_EASY_DMA_SUPPORT)
    #endif

    Best regards,

    Edvin

Related