Skip to main content
Markus Vogel
Associate II
February 15, 2017
Question

CubeMX, STM32L476, USART Parity problem

  • February 15, 2017
  • 4 replies
  • 2276 views
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
This topic has been closed for replies.

4 replies

ST Technical Moderator
February 15, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Markus Vogel
Associate II
February 15, 2017
Posted on February 15, 2017 at 15:08

Ok, thanks for the information.

Looking forward to hearing from you

Jeanne Joly
Associate
March 3, 2017
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

Markus Vogel
Associate II
March 3, 2017
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