Skip to main content
Visitor II
September 18, 2026
Question

RxEventCallback in C5 family

Hello everyone,

I used to work with U5 family microcontrollers. Recently I migrate to C5 families, and to MX2 UI.
When I wanted to create interruptions for DMA UART events, normally I worked with RxEventCallback (classic). However, seems I´m not capable to find this same __weak function anywhere inside the hal_uart.c file. Am I missing something? 
I´m working with STM32C562R mcu, in CubeIDE 2.2
Thank you everyone.

1 reply

ST Technical Moderator
September 28, 2026

Hello ​@OliverOG 


In HAL1, there are two separate callback functions for handling the completion of UART receive operations.

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)

void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)

In HAL2, these have been merged into a single function with additional parameters to provide more detailed information about the receive event.

void HAL_UART_RxCpltCallback(hal_uart_handle_t *huart, uint32_t size_byte, hal_uart_rx_event_types_t rx_event)

Please refer to HAL1 to HAL2 - migration guide for more details 

HAL UART I/O operations migration - HAL2 Migrator 1.1.0 documentation

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om