cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 OSMessageQueue Hardfault error

RiverDi_user
Associate III

Hello,

 

I am using a RIverDI STM32U5A9 and I am facing a strange hardfault issue in my environment.

The connection details as follows:

ESP board <--UART--> STM32 <--MessageQueue---> LCD display

The ESP board sends continuous data through UART and the STM32 UART task receives the data and send the data to LCD display task through message queue. Whenever I try to restart the ESP after firmware update, the STM32 stops getting UART data and reinit the UART once the connection is reestablished. But the application gets into hardfault error when this happens. The hardfault occurs after few packats transfer and not on the first UART reception.

RiverDi_user_0-1727941809164.png

Can someone help me on this?

 

Thanks!

 

10 REPLIES 10
RiverDi_user
Associate III

I was able to findout the rootcause and it was before the osMessageQueue. The issue is fixed now after I checked the buffer index which was exceeding the allocated buffer limit.

 

Thanks everyone for your replies!