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

Can I use RTT instead of UART for a console on nRF5340?

I have been using UART0 to implement a very simple console using console_getline_init() and console_getline().

So the nRF5340 receives commands over UART0 and outputs printf's over UART0.

I have also been using SPIS1.

Now I need a TWIM peripheral, but TWIM2 and TWIM3 don't work on nRF5340 yet.

So I've tried moving the console over to RTT so I can use TWIM0.

Output to RTT is working, but I haven't found an equivalent way to receive characters over RTT (something similar to console_getline())

The other tickets I've read are about enabling logging over RTT (output only).

Is there a way to get characters over RTT? (RTT input)

Related