cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Odd Parity in USART1 Configuration -- stm32L452RE uC

rsoc
Associate III

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

2 REPLIES 2

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

rsoc
Associate III

for whatever reason my code didnt paste, but the response is spot on. good to go, thank you!