Page 1 of 1

uart_write() strange behaviour

Posted: 25 Jun 2021 16:25
by Kct@vt
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?

Re: uart_write() strange behaviour

Posted: 29 Jun 2021 13:28
by filip.grujcic
Hello,

Would it be possible for you zip and attach your project, so we could take a look at it?

Regards,