RTT Not Working When UART ASYNC API Is Enabled

I have an application setup to use RTT for console and logging whereas UART is disabled.  If I enable the UART async API then RTT stops working.

Working:

CONFIG_ESB=y
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_LOG=y
#CONFIG_UART_ASYNC_API=y

CONFIG_USE_SEGGER_RTT=y

CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_MULTITHREADING=y
CONFIG_LOG_BACKEND_RTT=y

Fails:

CONFIG_ESB=y
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_LOG=y
CONFIG_UART_ASYNC_API=y

CONFIG_USE_SEGGER_RTT=y

CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_MULTITHREADING=y
CONFIG_LOG_BACKEND_RTT=y

Setup:

Ubuntu 22.04, VSCode, nRF Connect 2.1.2, NRF52840DK

Parents
  • Hello,

    I believe there are some examples in the nrf connect sdk that use this config option:
    CONFIG_UART_ASYNC_API=y

    You could take a look at those for comparison and see if you experience the same with those if you add RTT (in other words the same as you are doing, just the opposite exercise). Also, shouldn't you be adding CONFIG_SERIAL=y here?

    I am not sure what you have connected the RX pin to here, but make sure it's pulled high externally if it's not driven already driven high by a third party MCU.

    It could be that you are experiencing an assert, so you can try to add:

    # Debugging configuration
    CONFIG_THREAD_NAME=y
    CONFIG_THREAD_ANALYZER=y
    CONFIG_THREAD_ANALYZER_AUTO=y
    CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
    CONFIG_THREAD_ANALYZER_USE_PRINTK=y

    # Add asserts
    CONFIG_ASSERT=y
    CONFIG_ASSERT_VERBOSE=y
    CONFIG_ASSERT_NO_COND_INFO=n
    CONFIG_ASSERT_NO_MSG_INFO=n
    CONFIG_RESET_ON_FATAL_ERROR=n
    CONFIG_THREAD_NAME=y

    Best regards,
    Kenneth

Reply
  • Hello,

    I believe there are some examples in the nrf connect sdk that use this config option:
    CONFIG_UART_ASYNC_API=y

    You could take a look at those for comparison and see if you experience the same with those if you add RTT (in other words the same as you are doing, just the opposite exercise). Also, shouldn't you be adding CONFIG_SERIAL=y here?

    I am not sure what you have connected the RX pin to here, but make sure it's pulled high externally if it's not driven already driven high by a third party MCU.

    It could be that you are experiencing an assert, so you can try to add:

    # Debugging configuration
    CONFIG_THREAD_NAME=y
    CONFIG_THREAD_ANALYZER=y
    CONFIG_THREAD_ANALYZER_AUTO=y
    CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
    CONFIG_THREAD_ANALYZER_USE_PRINTK=y

    # Add asserts
    CONFIG_ASSERT=y
    CONFIG_ASSERT_VERBOSE=y
    CONFIG_ASSERT_NO_COND_INFO=n
    CONFIG_ASSERT_NO_MSG_INFO=n
    CONFIG_RESET_ON_FATAL_ERROR=n
    CONFIG_THREAD_NAME=y

    Best regards,
    Kenneth

Children
No Data
Related