2023-09-04 12:04 PM
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?
2023-09-04 01:03 PM - edited 2023-09-04 05:32 PM
Hello @Uwe Bonnes
I think this is not a problem. The chips STM32F05X support only 8 or 9 bits length data .
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
2023-09-04 01:50 PM
Some remark in 27.8.1. would help.
2023-09-04 01:57 PM - edited 2023-09-04 05:31 PM
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