2021-11-25 03:34 AM
2021-11-25 06:20 AM
Give us a clue.
Unless you tell us what you're currently doing, we can't say what you need to change to make it work.
Garbage can mean that your baud rate is wrong.
Or that the polarity is wrong (logic-level signalling is reversed from "RS232" levels).
2021-11-25 06:41 AM
Most likely the baud rate, data bits, or polarity settings are mismatched between the two.
2021-11-25 07:14 AM
Thank you for your responses. I'm just trying to run these lines of code on CubeIDE to print a simple "Hello" message at my serial terminal:
strcpy((char*)char_buf, "Hello!\n");
HAL_UART_Transmit(&hlpuart1, char_buf, strlen((char*)char_buf), HAL_MAX_DELAY);
HAL_Delay(100);
The LPUART1 parameter settings are:
Baud rate: 9600 bps
Word length: 8 bits (including parity)
Parity: None
Stop bits: 1
At the moment, I am getting nothing on my desktop serial terminal (which are also configured to the same settings, i.e. baud rate, etc)
Many thanks for your help and suggestions