2021-02-05 10:03 AM
Hi--
I/m pretty stumped. I am trying to implement a odd parity configuration for USART1 in an stm32L452RE micro. I've confirmed without parity the usart behaves as expected at the needed baud. When i introduce parity into the code and sniff the data out of a logic analyzer, the data is error filled. I am probably doing something stupid, but wondering if someone sees something in my function to initialize the USART1 i am missing...
If it is not the init function, is the transmit using parity different than typical usart? Could I be getting caught there?
Thank you!
Solved! Go to Solution.
2021-02-05 10:05 AM
In STM32, quite untypically, the parity bit counts towards the total number of bits. So, if you want to implement 8P1, you have to set 9 data bits.
JW
2021-02-05 10:05 AM
In STM32, quite untypically, the parity bit counts towards the total number of bits. So, if you want to implement 8P1, you have to set 9 data bits.
JW
2021-02-05 10:11 AM
for whatever reason my code didnt paste, but the response is spot on. good to go, thank you!