UART_INIT causing no RTT LOG output

Custom board using BL654 (NRF52840)

SDK 17.1.0

SD140 7.2.0

I was able to run the ble_app_uart totally successfully (with RTT LOG output) until I tried to add uart capability. Now I get no output at all on RTT viewer (before I did), and when on the debugger, it crashes before the first function call in main saying unknown function at 0x00000A60. The uart is connected to a peripheral and is only supposed to fetch data for processing, not redirected to bluetooth or anything.

  • Hi,

    What is NRF_LOG_BACKEND_RTT_ENABLED and NRF_LOG_BACKEND_UART_ENABLED set to in your sdk_config.h file?

    regards
    Jared
  • Okay so everything is working now. What I changed was to put the log_init() function (I'm using RTT not UART for logging) before anything else in main(which is not the default configuration and it should be). What was happening was a fatal error in the uart_init function. I had been using a buffer size NOT a power of two which I couldn't see because logging was initialized yet. Either way, I propose a change that for ANY example using log_init() that that call comes first in main before anything else.

  • Hi,

    Good that you found the issue. 

    JGusler said:
    I had been using a buffer size NOT a power of two which I couldn't see because logging was initialized yet. Either way, I propose a change that for ANY example using log_init() that that call comes first in main before anything else.

    Valid point, actually in most of our examples it's actually the case. Only case I found so far, where this is not the case is ble_app_uart?

    regards

    Jared 

Related