uart_write() strange behaviour
Posted: 25 Jun 2021 16:25
Hi,
I'm using uart_write() to send a 7 byte array out the serial port (mikroBUS 1) every second.
uart_write(&uart, frame, 7);
I have the uart library set for blocking operation (mikroSDK 2.0).
hardware: EasyMxPro v7, STM32F107VC
The 1st write sends out 9 bytes, and subsequent writes send out typically 1 or 2 bytes.
After a while, it does send out 7 bytes but not starting at the right location and sometimes it sends out values of 0 (which are not in my array).
It appears that the ring buffer code of the uart isn't working correctly?
I'm using uart_write() to send a 7 byte array out the serial port (mikroBUS 1) every second.
uart_write(&uart, frame, 7);
I have the uart library set for blocking operation (mikroSDK 2.0).
hardware: EasyMxPro v7, STM32F107VC
The 1st write sends out 9 bytes, and subsequent writes send out typically 1 or 2 bytes.
After a while, it does send out 7 bytes but not starting at the right location and sometimes it sends out values of 0 (which are not in my array).
It appears that the ring buffer code of the uart isn't working correctly?