Hi again new issue so new thread. we have USART3 on PC10/PC11 for debug output. But for some reason its outputting garbage.
I created a hello world in cubeIDE and it works fine there.
I am using the same clock config as cubeIDE so I know its not some strange clock sync issue.
The output is bad enough that it doesnt even show in my IDE serial out, only in putty.
Set my baud to 115200, and even tried a slower 9600. Neither work.
So is there something else deeper in the variant files that need to be tweaked for this to work correctly?
Any help would be great.
USART3/Serial3 outputting garbage... U575
USART3/Serial3 outputting garbage... U575
Is it using HSE? if yes which value?Mangy_Dog wrote: Thu Jun 05, 2025 12:24 pm Hi again new issue so new thread. we have USART3 on PC10/PC11 for debug output. But for some reason its outputting garbage.
I created a hello world in cubeIDE and it works fine there.
I am using the same clock config as cubeIDE so I know its not some strange clock sync issue.
Default value is:
#define HSE_VALUE 16000000UL /*!< Value of the External oscillator in Hz */
So if you use HSE with another value you have to redefine it else all frequencies computed will be wrong.
Just a dogs body developer, mostly making props and stuff...
Re: USART3/Serial3 outputting garbage... U575
Is it using HSE? if yes which value?Mangy_Dog wrote: Thu Jun 05, 2025 12:24 pm Hi again new issue so new thread. we have USART3 on PC10/PC11 for debug output. But for some reason its outputting garbage.
I created a hello world in cubeIDE and it works fine there.
I am using the same clock config as cubeIDE so I know its not some strange clock sync issue.
Default value is:
#define HSE_VALUE 16000000UL /*!< Value of the External oscillator in Hz */
So if you use HSE with another value you have to redefine it else all frequencies computed will be wrong.
Re: USART3/Serial3 outputting garbage... U575
Im using HSE as the main clock in the clocks setup I have the uarts connected to SYSCLK which is derived from HSE through PLLM /1 X23 /6 to give a target of 32mhz main clock.
Its a 8mhz source.
In what file does "#define HSE_VALUE 16000000UL /*!< Value of the External oscillator in Hz */" go? Looks like that might be the issue...
Its a 8mhz source.
In what file does "#define HSE_VALUE 16000000UL /*!< Value of the External oscillator in Hz */" go? Looks like that might be the issue...
Just a dogs body developer, mostly making props and stuff...
Re: USART3/Serial3 outputting garbage... U575
Simply redefine it in your variant*.h file
Example for NUCLEO_F722ZE:
https://github.com/stm32duino/Arduino_C ... 2ZE.h#L224
Example for NUCLEO_F722ZE:
https://github.com/stm32duino/Arduino_C ... 2ZE.h#L224
Re: USART3/Serial3 outputting garbage... U575
Looking in the file that used to be called variant_generic.h it was never defined to begin with.fpiSTM wrote: Thu Jun 05, 2025 2:20 pm Simply redefine it in your variant*.h file
Example for NUCLEO_F722ZE:
https://github.com/stm32duino/Arduino_C ... 2ZE.h#L224
Just a dogs body developer, mostly making props and stuff...
Re: USART3/Serial3 outputting garbage... U575
WOOHOO! adding the define worked 
#define HSE_VALUE 8000000UL
Thank you

#define HSE_VALUE 8000000UL
Thank you
Just a dogs body developer, mostly making props and stuff...
Re: USART3/Serial3 outputting garbage... U575
If you used the generic and not a dedicated variant then you can use the build_opt.h or the hal_conf_extra.h
https://github.com/stm32duino/Arduino_C ... uild_opt.h
https://github.com/stm32duino/Arduino_C ... definition
https://github.com/stm32duino/Arduino_C ... uild_opt.h
https://github.com/stm32duino/Arduino_C ... definition