FreeRTOS task delete for PSoC6

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

Hello,

Executing Task delete causes an infinite loop in portFORCE_INLINE static void vPortRaiseBASEPRI( void ) of "portmacro.h".

The "#define INCLUDE_vTaskDelete" is 1 in "FreeRTOSConfig.h".

pastedImage_0.png

Please tell me how to resolve.

Best regards,

Yocchi

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Yocchi-san,

Thank you for sharing the simple project for us to easily debug!

The reason the FreeRTOS application reaches a fault condition is because you are using vTaskDelete() with Heap 1 memory allocation scheme. Heap 1 does not support task delete function -

pastedImage_0.png

I changed the memory allocation scheme to Heap 4 and added code to delete the task only once and vTaskDelete() API worked for me. I have attached the entire project for your reference.

Hope this helps,

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
3 Replies
lock attach
Attachments are accessible only for community members.
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Yocchi-san,

Thank you for sharing the simple project for us to easily debug!

The reason the FreeRTOS application reaches a fault condition is because you are using vTaskDelete() with Heap 1 memory allocation scheme. Heap 1 does not support task delete function -

pastedImage_0.png

I changed the memory allocation scheme to Heap 4 and added code to delete the task only once and vTaskDelete() API worked for me. I have attached the entire project for your reference.

Hope this helps,

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Hello Rakshith M B-san,

Thank you very much.

I was able to task delete by selecting heap_4.c.

FreeRTOS - Memory management options for the FreeRTOS small footprint, professional grade, real time...

Best regards,

Yocchi

0 Likes

Hi Yocchi-san,

Thank you for the update on the thread. Glad your issue is resolved

Best Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes