Skip to main content
Javier1
Principal
Aug 18, 2022 11:34 AM UTC
Question

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

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

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
Aug 18, 2022 12:40 PM UTC

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