AnsweredAssumed Answered

CubeMX, STM32L476, USART Parity problem

Question asked by Vogel.Markus on Feb 15, 2017
Latest reply on Mar 3, 2017 by Vogel.Markus

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

Attachments

Outcomes