cancel
Showing results for 
Search instead for 
Did you mean: 

Why is HAL_UART_Receive_IT not triggering the callback function on STM32F103?

timdavid0812
Visitor

I’m using HAL_UART_Receive_IT() on an STM32F103 to receive serial data asynchronously. The UART initialization appears correct, and I can send data successfully, but the HAL_UART_RxCpltCallback() function never gets triggered. I’ve confirmed the interrupt is enabled in NVIC and the buffer size is correct.

Is there something I might be missing in configuration or code structure that prevents the callback from firing?
Any sample code or debugging steps would be greatly appreciated. Thanks!

2 REPLIES 2
Ozone
Principal II

What UART interrupts do you configure, and do they fire ?
Assuming RxNE, set a corresponding breakpoint in the interrupt handler.

Do you see any signal on the Rx pin when the other side transmits ?

Andrew Neil
Super User

Welcome to the forum.

Please see How to write your question to maximize your chances to find a solution for best results.

 


@timdavid0812 wrote:

Is there something I might be missing 


We can't see your code, so we can't say what might be missing or incorrect!

See: How to insert source code.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.