RTT & RTT disable sdk 12/13 nRF52832/nRF52840

BLE 999 gravatar image

asked 2017-07-17 10:59:28 +0200

Dear all,

Help please, I'm evaluating ble_app_uart (Central/Peripheral) but I don't understand how to disable the echo I have on the RTT USB VCP

When I send data from the UART, I got (PCA10056/10040) the data in both on the RTT USB VCP and on the UART I would like to control separately the UART and the USB VCP.

I would like to be able to use NRF_LOG in parallel, let's say NRF_LOG_RAW_INFO()/NRF_LOG_GETCHAR() for the RTT USB VCP only and printf() for UART.

example: if I do: printf("Hello world"), I got "Hello world" on both the USB/VCP (Segger) and on the PuTTY (from the UART) on the Host

Is there any #define to set (perhaps in sdk_config.h)? Probably a combination of : NRF_LOG_ENABLED,NRF_LOG_BACKEND_SERIAL_USES_UART,NRF_LOG_BACKEND_SERIAL_USES_RTT


2) In the following setting, the printf() outputs the "Hello world" on both the USB/VCP and on the UART PuTTY but the NRL_LOG_RAW_INFO() don't output anything NRF_LOG_ENABLED=1, NRF_LOG_BACKEND_SERIAL_USES_UART=1, NRF_LOG_BACKEND_SERIAL_USES_RTT=0

any idea?

Thanks in advance

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
Petter gravatar image

answered 2017-07-17 14:42:55 +0200


edit flag offensive delete publish link more


Yes, I tried your setting and I got the following:

NRF_LOG_INFO("Hello word NRF LOG") => nothing on the both two PuTTY (USB/VCP & UART)

printf("Hello word printf") => I got the "Hello word printf" on both the two PuTTY (USB/VCP & UART)

I excepted to have: "Hello word NRF LOG" on PuTTY USB/VCP "Hello word printf" on PuTTY UART

Thanks for you fast reply Petter


ble999 ( 2017-07-17 15:12:20 +0200 )editconvert to answer

Strange. Seems to be working fine here. Have you made any other changes to the project?

Petter Myhre ( 2017-07-17 15:24:35 +0200 )editconvert to answer

Peter, I re-do the test using SDK 13.0.7ca7556 with the ble_peripheral\pca10056_s140

the only modification I did was: NRF_LOG_BACKEND_SERIAL_USES_RTT=0 and adding in the main(): printf("Hello word -printf"); NRF_LOG_RAW_INFO("Hello word -NRF_LOG");

Results: PuTTY USB/RS232: Hello word - printf PuTTY UART: Hello word - printf

(the Hello word -NRF_LOG didn't output)

I expected to have only the ouput on PuTTY UART and nothing on the PuTTY USB/VCP

Sorry about my previous text mistake

ble999 ( 2017-07-17 16:02:52 +0200 )editconvert to answer

Why would you set NRF_LOG_BACKEND_SERIAL_USES_RTT = 0? It should be 1. And NRF_LOG_BACKEND_SERIAL_USES_UART=0. Actually the ble_app_uart example should work like that out of the box. NRF_LOG_INFO() should appear on RTT and printf should appear on UART.

Petter Myhre ( 2017-07-18 14:06:49 +0200 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower


Asked: 2017-07-17 10:59:28 +0200

Seen: 40 times

Last updated: Jul 17