cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F05 and Uart 7 bit

Uwe Bonnes
Principal III

Hello,

RM0091(Rev 10) "27.8.1  USART control register 1 (USART_CR1)" shows bits M0 and M1. However

STM32Cube_FW_F0_V1.11.4/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f051x8.h
only defines

#define USART_CR1_M_Pos (12U)
#define USART_CR1_M_Msk (0x1UL << USART_CR1_M_Pos) /*!< 0x00001000 */
#define USART_CR1_M USART_CR1_M_Msk /*!< Word Length */

as it defined for the USART IP e.g. used in stm32f4

 

Omission in the header or bad description in RM0091?

 

3 REPLIES 3
Issamos
Lead II

Hello @Uwe Bonnes 

I think this is not a problem. The chips STM32F05X support only 8 or 9  bits length data .

Screenshot_2023-09-04-20-51-20-85_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

Screenshot_2023-09-04-20-52-03-40_e2d5b3f32b79de1d45acd1fad96fbb0f.jpg

That's why the bit M1 is not going to be used and will still 0 as his default value and the word length will be indicated only using the M0 that will represent alone the 2-bits M value but is going to be better if we add the 0 to the M in the .h file indicated @Imen.D to make the file clearer.

Thank you for your participation and hope the Community Team will give a positive feedback.

Best regards.

II

Uwe Bonnes
Principal III

Some remark in 27.8.1. would help.

There is a already a Note (Note: Not all modes are supported In 7-bit data length mode. Refer to Section 27.4: USART implementation for details.) The only thing that it's going to be good if ST added is the 0 for the M (M0) in the .h file. 

Best regards.

II