SerialDriver STM32F4

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
zimon
Posts: 1
Joined: Tue Apr 04, 2017 10:28 am

SerialDriver STM32F4

Post by zimon »

Hi guys,
I'm working with a board based on STM32F4 and a Firmaware running with ChibiOS/HAL
Maybe some heard about the custom motor controller VESC by Vedder.

So his Firmware is based on ChibiOS/HAL. Now I am working on a custom application to run the motor controller.
Currently I want to use the SerialDriver to send values and receive commands.

I switched on and initialize the SerialDriver. Now I get the following error, where I don't find any way to solve:

Code: Select all

.../ChibiOS_3.0.2/os/hal/ports/STM32/LLD/USARTv1/uart_lld.c:444: multiple definition of `Vector15C'
build/obj/serial_lld.o:.../ChibiOS_3.0.2/os/hal/ports/STM32/LLD/USARTv1/serial_lld.c:363: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [ChibiOS_3.0.2/os/common/ports/ARMCMx/compilers/GCC/rules.mk:236: build/BLDC_4_ChibiOS.elf] Error 1


So what I did is setting HAL_USE_SERIAL True and STM32_SERIAL_USE_USART6 True
and initialize the SerialCode by this Code:

Code: Select all

static SerialConfig uartCfg =
    {
    38400,0,0,0 // bit rate
    };
    sdStart(&SD6, &uartCfg);


Anybody any idea, or is there a tutorial how to use the SerialDriver?
Thanks for help
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: SerialDriver STM32F4

Post by RoccoMarco »

Hi,
something is already using uart 6. Maybe it used internally by VESC.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: SerialDriver STM32F4

Post by Giovanni »

Have you enabled both Serial and UART drivers?

Giovanni
Post Reply