2021-07-09 01:25 PM
While USART (receive from PC and transfer of gained information back, pic. 1) perfectly works on low baud rates like 9600, use of high baud rates leads to obscure results (bad receive and OK transmit, pic. 2)
STM32L476VGT6
2021-07-09 01:41 PM
Higher rates are less tolerant to jitter or clock mismatch. Although 14400 shouldn't be a problem. Check to make sure the clock is accurate, pipe MCO out and measure frequency. If you're using HSI, ensure HSITRIM is set properly per the datasheet/reference manual.
2021-07-13 08:43 AM
@TDK
Not sure I can measure frequency (the only tool I have is logic analyzer).
Also tried to use different clock sources (including HSI) but no change.
Is there anything else that can cause the problem?
I start hating this board and myself for not being able to set up such a simple interface
2021-07-13 09:12 AM
> (the only tool I have is logic analyzer).
Then observe the USART pins using that tool.
What do you use as interface between STM32 and PC?
JW
2021-07-13 09:23 AM
I wonder. If you have your clock frequencies high enough that you can divide good frequencies to the UART, then what else can go wrong. Is your ARM fast enough. Can your chip drive IO well. Can your system handle single bytes, but not several with zero delay between them.
2021-07-13 09:31 AM
This is exactly how a mismatch in clock rates would manifest. A logic analyzer will be enough to show the signal rate on the line. Double check that the speed, parity, and stop bits settings are identical on both the STM32 and the receiving PC.
It can be frustrating, but there is an explanation and solution if you want to spend the time to find it.
2021-07-13 10:04 AM
@Community member
FT232R, if I'm not mistaken
2021-07-13 10:31 AM
OK and now show the waveforms on the STM32 UART pins observed by the logic analyzer.
JW
2021-07-13 12:17 PM
@Community member
Sending "6" to STM, receiving back "Hi" and interpreted 6
2021-07-13 03:38 PM
I don't understand what do you display here. Why don't you do the same "echo" test as above, so that we can see both waveforms on Rx and on Tx pins and compare them.
JW