diff options
| author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-05-27 15:55:29 +0000 | 
|---|---|---|
| committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-05-27 15:55:29 +0000 | 
| commit | 5cb659cbc19c23e2ae27e4dd8ea736ed00230e23 (patch) | |
| tree | 8f3ca65eb02cf760c0da60a6a0216207b54d477f | |
| parent | 0d9f42c9d9ce052f7ddf42174eafefae7516f99a (diff) | |
| download | ChibiOS-5cb659cbc19c23e2ae27e4dd8ea736ed00230e23.tar.gz ChibiOS-5cb659cbc19c23e2ae27e4dd8ea736ed00230e23.tar.bz2 ChibiOS-5cb659cbc19c23e2ae27e4dd8ea736ed00230e23.zip | |
Fixed bug #837.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10207 35acf78f-673a-0410-8e92-d51de3d6d3f4
| -rw-r--r-- | demos/STM32/RT-STM32F070RB-NUCLEO64/mcuconf.h | 3 | ||||
| -rw-r--r-- | os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c | 14 | ||||
| -rw-r--r-- | os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c | 14 | ||||
| -rw-r--r-- | readme.txt | 2 | 
4 files changed, 26 insertions, 7 deletions
| diff --git a/demos/STM32/RT-STM32F070RB-NUCLEO64/mcuconf.h b/demos/STM32/RT-STM32F070RB-NUCLEO64/mcuconf.h index 134a6c969..cc5cd7efb 100644 --- a/demos/STM32/RT-STM32F070RB-NUCLEO64/mcuconf.h +++ b/demos/STM32/RT-STM32F070RB-NUCLEO64/mcuconf.h @@ -137,8 +137,7 @@  #define STM32_SERIAL_USE_UART4              FALSE
  #define STM32_SERIAL_USART1_PRIORITY        3
  #define STM32_SERIAL_USART2_PRIORITY        3
 -#define STM32_SERIAL_USART3_PRIORITY        3
 -#define STM32_SERIAL_UART4_PRIORITY         3
 +#define STM32_SERIAL_USART3_8_PRIORITY      3
  /*
   * SPI driver system settings.
 diff --git a/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c b/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c index 8dadd1193..4014ab5bb 100644 --- a/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c +++ b/os/hal/ports/STM32/LLD/USARTv2/hal_serial_lld.c @@ -53,14 +53,18 @@  #define USART_CR1_M_1                       (1 << 28)
  #endif
 -/* Handling the case where UART4 and UART5 are actually USARTs, this happens
 -   in the STM32F0xx.*/
 +/* Workarounds for those devices where UARTs are USARTs.*/
  #if defined(USART4)
 -#define UART4                               USART4
 +#define UART4 USART4
  #endif
 -
  #if defined(USART5)
 -#define UART5                               USART5
 +#define UART5 USART5
 +#endif
 +#if defined(USART7)
 +#define UART7 USART7
 +#endif
 +#if defined(USART8)
 +#define UART8 USART8
  #endif
  /*===========================================================================*/
 diff --git a/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c b/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c index 04e25d9c1..5bf3b6089 100644 --- a/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c +++ b/os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c @@ -30,6 +30,20 @@  /* Driver local definitions.                                                 */
  /*===========================================================================*/
 +/* For compatibility for those devices without LIN support in the USARTs.*/
 +#if !defined(USART_ISR_LBDF)
 +#define USART_ISR_LBDF                      0
 +#endif
 +
 +#if !defined(USART_CR2_LBDIE)
 +#define USART_CR2_LBDIE                     0
 +#endif
 +
 +/* STM32L0xx/STM32F7xx ST headers difference.*/
 +#if !defined(USART_ISR_LBDF)
 +#define USART_ISR_LBDF                      USART_ISR_LBD
 +#endif
 +
  /* STM32L0xx/STM32F7xx ST headers difference.*/
  #if !defined(USART_ISR_LBDF)
  #define USART_ISR_LBDF USART_ISR_LBD
 diff --git a/readme.txt b/readme.txt index e8ed89bfa..7d4122ecc 100644 --- a/readme.txt +++ b/readme.txt @@ -165,6 +165,8 @@         (backported to 16.1.9).
  - HAL: Fixed dependency to kernel in uart lld (v1) (bug #838)(backported
         to 16.1.9).
 +- HAL: Fixed issue with not supported LIN on STM32F070xB (bug #837)(backported
 +       to 16.1.9).
  - HAL: Fixed STM32 OTGv1 number of endpoints (bug #833)(backported to 16.1.8).
  - HAL: Fixed transaction end problem with STM32 OTGv1 driver (bug #832)
         (backported to 16.1.8).
 | 
