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

RTT Viewer only shows logs when main thread in nRF9160 is sleeping

Hello,

I am using the Thingy:91 PCB and I have disabled the nRF52 by cutting SB4 and soldering SB3. This makes me unable to log through UART. For this reason I implemented RTT logging and it has been successful with the exception that messages are only printed on the JLink Viewer when my main thread in my application sleeps.

I would like to know if that is a normal behaviour or not, I could not find any information related to it.

I think you might want to see the proj.conf that I am using:

CONFIG_SERIAL=y
#CONFIG_UART_0_NRF_UARTE=y

# General config
CONFIG_ASSERT=y

# Network
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y

# BSD library
CONFIG_BSD_LIBRARY=y

# AT host library
CONFIG_AT_HOST_LIBRARY=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Stacks and heaps
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096

# i2c
CONFIG_LOG=y
CONFIG_I2C_LOG_LEVEL_DBG=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_I2C=y
CONFIG_I2C_NRFX=y
CONFIG_I2C_2=y
#CONFIG_I2C_2_NRF_TWIM=y

# Enabling printf and floats
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

# Enabling JSON
CONFIG_CJSON_LIB=y

#gpio
CONFIG_GPIO=y

#debug RTT
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n

#wdt
CONFIG_WATCHDOG=y

Thanks,

Aleix

Related