I am trying to implement lpuart rtos example driver code with a MIMXRT 1020 dev board as the master and Arduino Uno as the servant. I used a pre-made level converter to match signal to 3.3V. When testing the example code the with the lpuart config to UART2 (same issue with UART1), the receiving has a hardware buffer overrun issue when needed to receive a message longer than 4 bytes. I tried different setting of baud rate, receive buffer and background buffer. Also, when using baud rate of 115200, some of the message get corrupted. This issue was resolved using a lower baud-rate. Currently, I am speculating that the issue is software because with a lower baud rate it is able to receive any byte size less than or equal to 4 bytes. I was wondering if anyone has experiences with this issue? Thank you!
Hi @VolcanicCheese :
Please refer to the readme file,
The LPUART example for FreeRTOS demonstrates the possibility to use the LPUART driver in the RTOS. The example uses single instance of LPUART IP and writes string into, then reads back chars.
After every 4B received, these are sent back on LPUART.
From the source code, we can see the recv_buff is 4 bytes.
You can modify it according to your project.
Sorry for the late reply, Yes I did that already and did not solve the problem. I tried sending it chunks, but that did not solve the problem. It sends and receive the message "some" successfully. Then, when continuing it starts to receive "omes". Then it would send "omes". Then receive back "meso". This cycle of first byte going to last byte continuously happens.