2021-10-11 01:11 PM
I would like to use HAL_UARTEx_RxEventCallback from library "stm32fxxx_hal_uart_ex.c". This driver library is automatically included in STM32CubeIDE if I use F7 MCU but if I use F4 this library is not included. I also noticed it is not included in the github repository
https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Drivers/STM32F4xx_HAL_Driver/Src
How can I get HAL_UARTEx_RxEventCallback to work on F4. Do I have to manually import the library and where can I get one?
2021-10-11 01:16 PM
It's here:
Although it's defined as weak and doesn't really help you
> How can I get HAL_UARTEx_RxEventCallback to work on F4.
This is a separate question. You're supposed to implement HAL_UARTEx_RxEventCallback somewhere in your user code. It gets called from within the HAL IRQ handlers. In this case, here:
2021-10-12 12:06 AM
I get the undefined reference to `HAL_UARTEx_ReceiveToIdle_DMA' error when I call the:
HAL_UARTEx_ReceiveToIdle_DMA(&huart1, rxBuf, RX_BUF_SIZE);
I think it is because this function is part of extended HAL library "stm32f4xx_hal_uart_ex.c" (note the ex. on the end). And this library is not included in the drivers, but if I use F3 or F7 this library is included.
2021-10-12 12:57 AM
Dear @MAnto.2
There's no stm32f4xx_hal_uart_ex.c file in STM32CubeF4 HAL drivers.
HAL_UARTEx_ReceiveToIdle_DMA() function is defined in Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c, line 1808, so should be available when you compile the file.
Regards
2021-10-12 01:09 AM
Is there any way I can update the drivers or do I have to do it manualy?
2021-10-12 01:21 AM
V1.26.2 version of STM32CubeF4 package contains all required changes for using Reception To Idle API. F4 HAL drivers available in Drivers/STM32F4xx_HAL_Driver directory