cancel
Showing results for 
Search instead for 
Did you mean: 

Hi All!!. I am facing this weird issue with my STM32F411RE series eval board. And i am getting HardFault on UART initialize.

ambinabhi
Associate II

I enable freeRTOS (CMSIS_v2) middleware , trying to play around with threads. One of the thread has simple UART transmit function sending some sample message. As soon as the debugger reaches UART_Transmit functions it goes to HardFaultHandler and thread basically terminates itself. It works perfectly fine with CMSIS_v1 though. The problem is with v2. Anybody faced this issue ?

Any help would be much appreciated.

4 REPLIES 4

One would normally look at the faulting instructions and deduce the failure cause.

Floating point maths used, FPU not enabled.

Stack size or alignment.

Structure partially filled, or bad pointers.

Uninitialized auto/local variable.​

IRQ Handler.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I see no such problems as i am trying to debug it.

It works perfectly fine when cmsis v1 selected.

The processor provides specific details about its objections.

Check if RTOS prevents execution of privileged instruction.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

No it doesn't. In fact whats really weird is it works sometimes only when i press the reset button on the board. It transmits the data only then it doesn't loop. Am i missing any clock configurations that i am not aware of ?