NRF52833 Adding UART to Thead MQTTSN client publisher

Good day

I need to add UART to a project based "Thead MQTTSN client publisher" example code. The device needs to receive data over UART and then send the data to the MQTT broker. I have tried to port the code over from the peripheral UART example from the same SDK, but to no avail. Where as most of the SDK's examples perfectly illustrate their concept, it can sometimes be a nightmare to merge two examples.

Could you please provide some guidance on how to add UART capabilities to the Thread example.

Project is being done on a NRF52833 chip with version 4.1 of the Thread SDK.

Kind regards

Parents
  • There are a couple of things needed to make the project compile:

    In sdk_config.h, set NRFX_UARTE0_ENABLED:

    // <o> NRFX_UARTE0_ENABLED - Enable UARTE0 instance
    #ifndef NRFX_UARTE0_ENABLED
    #define NRFX_UARTE0_ENABLED 1
    #endif

    In project options, remove the preprocessor symbol "UART_ENABLED=0".

    Add "#include "bsp.h"" to main.c, before the check for #if defined(UART_PRESENT)\#if defined(UARTE_PRESENT).

    I also get one additional error related to the scatter file, but this might be an issue on my end and likely not related to the addition of UART.

Reply
  • There are a couple of things needed to make the project compile:

    In sdk_config.h, set NRFX_UARTE0_ENABLED:

    // <o> NRFX_UARTE0_ENABLED - Enable UARTE0 instance
    #ifndef NRFX_UARTE0_ENABLED
    #define NRFX_UARTE0_ENABLED 1
    #endif

    In project options, remove the preprocessor symbol "UART_ENABLED=0".

    Add "#include "bsp.h"" to main.c, before the check for #if defined(UART_PRESENT)\#if defined(UARTE_PRESENT).

    I also get one additional error related to the scatter file, but this might be an issue on my end and likely not related to the addition of UART.

Children
Related