Potential issue with UART library? #2896
-
|
I'm trying to set up up USART1 on my STM32H735. I call these functions to setup a new serialPort instance. HardwareSerial *serialPort = new HardwareSerial(USART1); In the function "uart_init" located in "uart.c", it goes through initializing the huart struct. However, the ClockPrescaler, next gets set anywhere and is loaded with a default garbage value. When the huart struct is passed to the function "UART_SetConfig", it faults on the line: because huart->Init.ClockPrescaler is some random garbage value. Is this an issue with the library itself? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
|
Hi,
|
Beta Was this translation helpful? Give feedback.
-
|
So you used LPUART1 as PA9 and PA10 are : Do this: |
Beta Was this translation helpful? Give feedback.


Hmm weird. Maybe it's just a quirk of PlatformIO. I still get the issue, but I'll just initialization the variables manually by modify the HardwareSerial class.
Thanks for your help!