2019-10-17 04:12 AM
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.
2019-10-17 04:50 AM
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.
2019-10-17 05:06 AM
I see no such problems as i am trying to debug it.
It works perfectly fine when cmsis v1 selected.
2019-10-17 05:18 AM
The processor provides specific details about its objections.
Check if RTOS prevents execution of privileged instruction.
2019-10-17 05:26 AM
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 ?