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

Read UART input while using Logger Module

I examine the Logger Module implementation a little and find out that the only way to get a character from UART is via the NRF_LOG_GETCHAR() macro, which is blocking.

I would like to receive bytes asynchronously and process them, both over UART and RTT. How could I do it with the Logger Module enable? Is using App UART library and other RTT API alongside the Logger Module an option?

Another question is, if I enable both UART and RTT for the Logger, which one will NRF_LOG_GETCHAR() get the character from? I did an SDK wide search could only trace back to nrf_log_getchar() in nrf_log_internal.h. I could not find its implementation anywhere.

Related