2024-03-06 12:08 AM
Hi all,
I am trying to implement ring buffer for my board that is STM32F407VG-DISC1. I have found out a tutorial and followed each and every step. However, when I transmitted message via serial console tool (hercules), I dont receive any data in Rx Buffer.
In the first snapshot attached, I can observe that Uart_sendstring function is working as I can see on the console (Hercules) "send string works".
However, when I send 11111 it is not received, therefore rxbuffer is empty as can be seen in the second snapshot and also uart_write function is not run, as "if(IsDataAvailable())" returns "0".
Could you please help me with this ?
You can see the repo here.
2024-03-06 02:25 PM
2024-03-06 03:57 PM
Check this git project https://github.com/karlyamashita/Nucleo-G431RB_Three_UART/wiki
It uses HAL_UARTEx_ReceiveToIdle_DMA so it'll interrupt on packets of data/messages instead of interrupting on each byte. Less overhead if you can use the DMA to do all the work while the STM32 if free to do other tasks. It uses a data structure so you can easily define multiple UART ports.
The problem with the repo link you provided is that is was designed for 1 UART/buffer so would have to be modified if you wanted to add more UART ports.