Skip to main content
ambinabhi
Associate II
October 17, 2019
Question

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

  • October 17, 2019
  • 4 replies
  • 642 views

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.

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
October 17, 2019

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
ambinabhi
ambinabhiAuthor
Associate II
October 17, 2019

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

It works perfectly fine when cmsis v1 selected.

Tesla DeLorean
Guru
October 17, 2019

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..