cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX, STM32L476, USART Parity problem

Markus Vogel
Associate III
Posted on February 15, 2017 at 12:22

Hello everybody,

I encountered the following problem when generating code from CubeMX for the USART peripheral of a STM32L476QEIx:

SETUP:

  • STM32CubeMX 4.19.0
  • CubeL4 Version 1.6.0
  • CPU STM32L476QEIx

PROBLEM:

  • USART1 is configured with Word length 9 bits (including parity) and Parity even (so I get 8 bits data and one parity-bit)
  • But CubeMX does not set the parity information in the USART_InitTypeDef structure in the auto-generated function MX_USART1_Init()
  • It  sets the values of the structure-element for the parity options none and odd though - see the attached screenshots
  • For even parity the USART-registers are not correctly initialized, i.e. the Parity-Enable bit is not set and therefore no parity generated -> so this really is a problem and leaves the USART incorrectly initialized!

Did anybody notice the same problem or knows how to solve it?

Thanks already and best regards

Markus

#uart/usart-parity-and-wordlengt #stm32l476 #cubemx
4 REPLIES 4
Imen.D
ST Employee
Posted on February 15, 2017 at 15:05

Hello Markus Vogel,

Thanks for highlighting this issue. I would inform you that your feedback is reported internally and will come back to you as soon as we have any updates.

Sorry for the inconvenience that it may bring.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Markus Vogel
Associate III
Posted on February 15, 2017 at 15:08

Ok, thanks for the information.

Looking forward to hearing from you

Jeanne Joly
Senior III
Posted on March 03, 2017 at 11:21

Hello

vogel.markus

,

Thanks for reporting this issue to us.

It will be solved in CubeMX-4.

BR. Eric

Posted on March 03, 2017 at 15:28

Dear Mr. Dampierre,

thanks for your reply. Looking forward to the new version.

Best wishes

Markus

Best regards | Mit freundlichen Grüßen