RTEMS | arm/stm32f4: extend USART DR field to 9 bits (!1141)

Kinsey Moore (@opticron) gitlab at rtems.org
Thu Mar 19 00:45:04 UTC 2026




Kinsey Moore commented on a discussion on bsps/arm/stm32f4/include/bsp/stm32_usart.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1141#note_146141

 >  #define STM32F4_USART_SR_FE BSP_BIT32(1)
 >  #define STM32F4_USART_SR_PE BSP_BIT32(0)
 >  	uint32_t dr;
 > -#define STM32F4_USART_DR(val) BSP_FLD32(val, 0, 7)
 > -#define STM32F4_USART_DR_GET(reg) BSP_FLD32GET(reg, 0, 7)
 > -#define STM32F4_USART_DR_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
 > +#define STM32F4_USART_DR(val) BSP_FLD32(val, 0, 8)
 > +#define STM32F4_USART_DR_GET(reg) BSP_FLD32GET(reg, 0, 8)
 > +#define STM32F4_USART_DR_SET(reg, val) BSP_FLD32SET(reg, val, 0, 8)

You should keep the 9 bit changes, but explicitly mask it to 8 bits on usage to preserve existing behavior.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1141#note_146141
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260319/4f0a4ee2/attachment.htm>


More information about the bugs mailing list