diff options
Diffstat (limited to 'chip/stm32/usart-stm32f0.c')
-rw-r--r-- | chip/stm32/usart-stm32f0.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chip/stm32/usart-stm32f0.c b/chip/stm32/usart-stm32f0.c index b4e7c924a8..740d3929bc 100644 --- a/chip/stm32/usart-stm32f0.c +++ b/chip/stm32/usart-stm32f0.c @@ -82,7 +82,14 @@ DECLARE_HOOK(HOOK_FREQ_CHANGE, freq_change, HOOK_PRIO_DEFAULT); void usart_clear_tc(struct usart_config const *config) { - STM32_USART_ICR(config->hw->base) |= STM32_USART_ICR_TCCF; + /* + * ST reference code does blind write to this register, as is usual + * with the "write 1 to clear" convention, despite the datasheet + * listing the bits as "keep at reset value", (which we assume is due + * to copying from the description of reserved bits in read/write + * registers.) + */ + STM32_USART_ICR(config->hw->base) = STM32_USART_ICR_TCCF; } /* |