Broken STM32F030 UART driver Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
andresv
Posts: 15
Joined: Tue Nov 29, 2016 11:09 am
Been thanked: 5 times

Broken STM32F030 UART driver  Topic is solved

Postby andresv » Mon May 22, 2017 11:15 am

Hi,

UART driver does not compile with RT-STM32F030R8-NUCLEO64 demo code.
The only change what I did was just to turn on UART1 driver from mcuconf.h and halconf.h

Code: Select all

#define STM32_UART_USE_USART1               TRUE


Code: Select all

#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
#define HAL_USE_UART                TRUE
#endif


And got following error:

Code: Select all

Compiling ch_test.c
Compiling test_root.c
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c: In function 'translate_errors':
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:35:24: error: 'USART_ISR_LBD' undeclared (first use in this function)
 #define USART_ISR_LBDF USART_ISR_LBD
                        ^
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:172:13: note: in expansion of macro 'USART_ISR_LBDF'
   if (isr & USART_ISR_LBDF)
             ^
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:35:24: note: each undeclared identifier is reported only once for each function it appears in
 #define USART_ISR_LBDF USART_ISR_LBD
                        ^
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:172:13: note: in expansion of macro 'USART_ISR_LBDF'
   if (isr & USART_ISR_LBDF)
             ^
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c: In function 'usart_start':
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:237:33: error: 'USART_CR2_LBDIE' undeclared (first use in this function)
   u->CR2 = uartp->config->cr2 | USART_CR2_LBDIE;
                                 ^
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c: In function 'serve_usart_irq':
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:35:24: error: 'USART_ISR_LBD' undeclared (first use in this function)
 #define USART_ISR_LBDF USART_ISR_LBD
                        ^
../../../os/hal/ports/STM32/LLD/USARTv2/hal_uart_lld.c:324:14: note: in expansion of macro 'USART_ISR_LBDF'
   if (isr & (USART_ISR_LBDF | USART_ISR_ORE | USART_ISR_NE |
              ^
Compiling test_sequence_001.c
make: *** [build/obj/hal_uart_lld.o] Error 1
make: *** Waiting for unfinished jobs....


gcc: arm-none-eabi-gcc-4.9.3
chibios:
commit b9df092c8c8134e51dd63b2e5046842d14019c59
Author: Giovanni Di Sirio <gdisirio@gmail.com>
Date: Thu May 18 13:35:01 2017 +0000

EDIT: found another thread about this problem: viewtopic.php?t=3389.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Broken STM32F030 UART driver

Postby Giovanni » Mon May 22, 2017 11:51 am

Hi,

Moving this in "bug reports" or it will be forgotten again...

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Broken STM32F030 UART driver

Postby Giovanni » Sun May 28, 2017 4:25 pm

Hi,

Fixed in repository.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 4 guests