S32K314 FreeRTSO Heap Usege question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K314 FreeRTSO Heap Usege question

1,233 Views
Wangfangyuanx
Contributor I

I created 5 tasks and a timer task using FreeRTOS on the S32K314 MCU. When I checked the Heap Usage, I found that 75% of the heap had been used. I didn't use the pvPortMalloc() function to allocate space in my code. Is this normal? If not, how can I check where exactly the heap space is being used? The FreeRTOS SDK I'm using is SW32K3_FreeRTOS_10_4_6_UOS_2_0_0_DS_updatesite_D2204, and the RTD version is SW32K3_RTD_4.4_2.0.0_DS_updatesite_D2204. I'm looking forward to your reply. Thank you.

 

Wangfangyuanx_0-1749613465390.png

 

0 Kudos
Reply
3 Replies

1,157 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Wangfangyuanx,

As you can see in the screenshot you posted, the tasks are allocated on the heap.

pvPortMalloc() is called by xTaskCreate();

FreeRTOS has also this API: xTaskCreateStatic() that can be use.

You need to enable "support static allocation".

 

Regards,

Daniel

0 Kudos
Reply

1,214 Views
danielmartynek
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

1,197 Views
Wangfangyuanx
Contributor I
Hi, Daniel, the heap implementation that I used was heap_4
0 Kudos
Reply