This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

logging data through the second UART (DMA) on nrf52840

Hi.
In nrf52840 is it possible to use in NRF_LOG the second UART (DMA based) ? 

I know i can define the TX pin in the SDK_CONFIG but can the NRF_LOG_BACKEND_UART work with UARTE1 ?

Parents
  • Hi,

    The UART instance used by the logger is hardcoded in the source (components\libraries\log\src\nrf_log_backend_uart.c:48 in SDK 17.1.0). If you want to use the second UART instance, you need to modify this line to:

    nrf_drv_uart_t m_uart = NRF_DRV_UART_INSTANCE(1);

    Note that the logger backend uses the UART driver configuration, so you need to enable the second UART instance in your sdk_config.h file:

    // <e> UART1_ENABLED - Enable UART1 instance
    //==========================================================
    #ifndef UART1_ENABLED
    #define UART1_ENABLED 1
    #endif

    Best regards,
    Jørgen

  • Thanks! But i looked in the code , doesn't it rely on the interrupts ? as far as i know it's based on DMA and from what i recall works differently than interrupt based UART, for input AND output (like you need to define the output buffer).

Reply Children
No Data
Related