Replies: 2 comments
-
Hi, You should the logging subsystem
The issues you are seeing are probably a combination of not reading at the correct offset within the rx buffer, and using %s to format the data in the buffer which is not safe given the potential of no string terminator present in the received data :) |
Beta Was this translation helpful? Give feedback.
-
@bjarki-trackunit I have modified my
Just notice that I have replaced In my program, the rx_buf length is set to 20 As you can see from logs above, I have sucesfully received messages Can you please help me understand how to handle this case? The issue is related to when the buffer fills up, but I would still like to be able to receive a full message. Do you understand what I mean? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I am learning about Zephyr RTOS and nRF52 microcontrollers. I have been following the Nordic DevAcademy basic tutorial:
https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-4-serial-communication-uart/topic/uart-driver/
The tutorial includes lesson about serial communication (UART).
One of the most important things for me when I am working with UART is to be able to print out whole received buffer. Then I can look at the data and do whatever I want with it. However, this simple task is somehow proving to be difficult using ASYNC UART method.
Describe the solution you'd like
A simple way to print out whole received buffer
Additional context
My main.c:
As you can see, from above, I tried to print out the buffer:
but it does not work as expect. Please see the following terminal logs: (The blue is what I send, The green is what is printed)

Could someone help me understand how to simply print out the data that I have sent?
Beta Was this translation helpful? Give feedback.
All reactions