cancel
Showing results for 
Search instead for 
Did you mean: 

I tried increasing Queue size and FreeRTOS lands in a HardFault().

Javier1
Principal

I am using a stm32f105RBt6, just teasing with FreeRTOS (cmsis_v2) at the moment.

Two unexpected things are happening:

  • If i stay with Dynamic allocated memory but increase my Queue size further than 10, i get thrown into a hardfault..... maybe some nefarious Ram accesses/stepping out of the heap? im still learning about that.

0693W00000QNz3GQAT.png 

  • If i declare the Mem allocation to be static, same error.0693W00000QNz3VQAT.png 

Increasing Heap size doesnt help

0693W00000QNz3uQAD.png 

Any tips of how to debugg this? I think i have alocated enough heap in RAM....

0693W00000QNz4YQAT.png0693W00000QNz4xQAD.png

we dont need to firmware by ourselves, lets talk
1 REPLY 1

Instrument the Hard Fault so you can see what exactly is being objected too there and work backward.

Check that the allocations haven't failed. Check alignment. heap not 8-byte aligned (depends on expectations)

Perhaps instrument the malloc/free to confirm there's not an issue there.

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