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

Why is NRF_LOG_DEFAULT_BACKENDS_INIT causing INVALID_STATE error when calling nrf_cli_init?

I tried to use UART both for NRF_LOG and NRF_CLI. Now it's running but I had a problem that calling to nrf_cli_init caused fatal error 8 - INVALID_STATE.

When I commented out the NRF_LOG_DEFAULT_BACKENDS_INIT, the error disappeared and now both LOG and CLI are working.

Why?

Parents Reply Children
  • These are my setting from sdk_config. 

    NRF_LOG_BACKEND_UART_ENABLED 1
    NRF_LOG_BACKEND_UART_TX_PIN 6
    NRF_LOG_BACKEND_UART_BAUDRATE 2576384
    NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE 64

    NRF_LOG_CLI_CMDS 1
    NRF_CLI_BLE_UART_CONFIG_LOG_ENABLED 0
    NRF_CLI_BLE_UART_CONFIG_LOG_LEVEL 3
    NRF_CLI_UART_CONFIG_LOG_ENABLED 0
    NRF_CLI_UART_CONFIG_LOG_LEVEL 3
    NRF_CLI_UART_ENABLED 1

    The CLI example has the same settings except for the baud rate.

Related