I use MK10FN1M0xxx12.
I create two tasks
FRTOS1_xTaskCreate((TaskFunction_t)operation_task, (signed char*) "tx", 1024, NULL, 1, NULL); FRTOS1_xTaskCreate((TaskFunction_t)log_managment_task, (signed char*) "rx", 512, NULL, 1, NULL);
It runs OK.
But if I increase the stack size
FRTOS1_xTaskCreate((TaskFunction_t)operation_task, (signed char*) "tx", 1024, NULL, 1, NULL); FRTOS1_xTaskCreate((TaskFunction_t)log_managment_task, (signed char*) "rx", 1024, NULL, 1, NULL);
I fall into FRTOS1_vApplicationMallocFailedHook
And I have #define configTOTAL_HEAP_SIZE (24576) /* size of heap in bytes */
How to fix the problem?
Solved! Go to Solution.
Sorry. Found the problem. Should increase heap size #define configTOTAL_HEAP_SIZE (32768)
Sorry. Found the problem. Should increase heap size #define configTOTAL_HEAP_SIZE (32768)
Hi,
just a comment:
xTaskCreate((TaskFunction_t)operation_task, (signed char*) "tx", 1024, NULL, 1, NULL);
this means you actually are requesting 4KB (4*1024 bytes) of stack space.
This of course depends on your application, but is rather high, and you maybe only wanted to reserve 1024 bytes of stack?
Erich
I see. Thank you.
Thanks for sharing.
Regards
Daniel