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

UART SDK12 NRF_LOG_GETCHAR() does not work

When I use NRF_LOG_GETCHAR() witn nRF52 DK and onboard SEGGER UART it stops in next NRF_LOG_INFO(). Also after ARM reset it keeps in this error state. It seems that SEGGER does not correctly drive CTS pin.

Also it is strange that when I disable UART flow control setting:

#define NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL 0

Then NRF_LOG_GETCHAR() does not work. But at least NRF_LOG_INFO() works after ARM reset.

Parents
  • I found a fix - you need to change a file: SDK12\components\drivers_nrf\uart\nrf_drv_uart.c lines 81 and 94 from:

    nrf_gpio_cfg_input(p_config->pselcts, NRF_GPIO_PIN_NOPULL);
    

    Into:

    nrf_gpio_cfg_input(p_config->pselcts, NRF_GPIO_PIN_PULLDOWN);
    

    Also note that flow control has to be enabled in "sdk_config.h":

    #define NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL 1
    

    Note that another option is to add external pull down on CTS (P0.7) and it starts work. Even when I touch it by finger it works...

Reply
  • I found a fix - you need to change a file: SDK12\components\drivers_nrf\uart\nrf_drv_uart.c lines 81 and 94 from:

    nrf_gpio_cfg_input(p_config->pselcts, NRF_GPIO_PIN_NOPULL);
    

    Into:

    nrf_gpio_cfg_input(p_config->pselcts, NRF_GPIO_PIN_PULLDOWN);
    

    Also note that flow control has to be enabled in "sdk_config.h":

    #define NRF_LOG_BACKEND_SERIAL_UART_FLOW_CONTROL 1
    

    Note that another option is to add external pull down on CTS (P0.7) and it starts work. Even when I touch it by finger it works...

Children
Related