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

Adding UART to Thread example (with CLI)

Hi,

using:

SDK for thread and Zigbee 4.1.0

NRF52840dk

I am trying to add UART (for my custom application) to an existing Thread example with CLI. (e.g. ble_thread_dyn_hrs_coap_srv_freertos)

Seems like Thread prebuilt stack has assigned P0.6 and P0.8 for its CLI uart.

So I am trying to use P1.13, P1.14 for my custom application UART which results in a slew of problems..

Seems that Thread wants to use UARTE rather than UART. OK, I can live with that... but how do I deal with duplicate definitions (linker error):

duplicate definitions for "UARTE0_UART0_IRQHandler" in "nrfx_uarte.o", and "uart.o(libopenthread-nrf52840-transport.a)".


Is there a simpler way to achieve what I want to do? or if one is building Thread with CLI enabled there's no way to add another UART?!


Thank you in advance!

Parents
  • Hi,

    The CLI library in OpenThread is using the UART0 instance for the CLI. If you want to use this UART instance for something else, you need to build the OpenThread libraries without CLI/UART support and remove the CLI from your application.

    Since you are using nRF52840, I would rather recommend that you use the second UARTE instance available, UARTE1. How to integrate this in your project depends a bit on what driver/library you want to use for configuring and controlling the UARTE instance.

    Best regards,
    Jørgen

Reply
  • Hi,

    The CLI library in OpenThread is using the UART0 instance for the CLI. If you want to use this UART instance for something else, you need to build the OpenThread libraries without CLI/UART support and remove the CLI from your application.

    Since you are using nRF52840, I would rather recommend that you use the second UARTE instance available, UARTE1. How to integrate this in your project depends a bit on what driver/library you want to use for configuring and controlling the UARTE instance.

    Best regards,
    Jørgen

Children
No Data
Related