SerialDriver STM32F4

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

SerialDriver STM32F4

Postby zimon » Tue Apr 04, 2017 10:41 am

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
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: SerialDriver STM32F4

Postby RoccoMarco » Tue Apr 04, 2017 10:46 am

Hi,
something is already using uart 6. Maybe it used internally by VESC.
Ciao,
RM

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

Re: SerialDriver STM32F4

Postby Giovanni » Tue Apr 04, 2017 1:37 pm

Have you enabled both Serial and UART drivers?

Giovanni


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 10 guests