Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#347 Errors in STM32F0xx UART driver

closed-fixed
nobody
2014-05-09
2012-11-23
steve
No

The STM32 USARTv2 driver has various errors in hal/platforms/STM32/USARTv2/uart_lld.c:

1. Various bits in CR2 and CR3 can only be written while the UART is disabled. Therefore the order of updating CR1..CR3 in uart_start() needs to be reversed, to do CR1 last.

Some 16-bit values need to be 32-bit to reflect the underlying register sizes:

96: translate_errors() should probably take a 32-bit parameter

156: usart_start() - cr1 to be 32-bit

271: serve_usart_irq() - isr to be 32-bit

Possible coding efficiency:
177 usart_start() - should be no need to reset pending interrupts; done by disabling UART.

Annotated file attached

Discussion

  • steve
    steve
    2012-11-23

    File as used by me - annotated

     
    Attachments
    • priority: 5 --> 4
    • status: open --> open-accepted
     
  • Will be fixed in 2.5.1unstable, fixed in trunk.

     
    • summary: Errors in UART driver --> Errors in STM32F0xx UART driver
     
    • milestone: 953057 --> 2.4.0
    • status: open-accepted --> open-fixed
     
  • Will be fixed in 2.4.3stable too, fixed in repository.

     
    • status: open-fixed --> closed-fixed