Timers and counting semaphore

I’m using a STM32F429Idiscovery and freeRTOS via the CMSIS wrapper.
I’m writing and application that uses 3 timer and a counting semaphore. But the kernel crashes. It works only if using only two timers and the semaphore.
It is a known issue or How I can solve the problems?

I’m afraid your post does not provide enough information for anybody to start to provide an answer without first asking a lot more questions. Please start by describing what ‘the kernel
crashes’ means - what is executing when the crash happens (if you pause the debugger, what is the code executing?). After that we will probably have more questions and ask you to post some code - it will also be a lot easier for everybody here if when you post code you use the native FreeRTOS API rather than the CMSIS wrapped API.

osThreadDef(T1, Thread1, osPriorityNormal, 0, configMINIMAL_STACK_SIZE);

osThreadDef(T2, Thread2, osPriorityBelowNormal, 0, configMINIMAL_STACK_SIZE);

osThreadDef(T3, Thread3, osPriorityLow, 0, configMINIMAL_STACK_SIZE);

ThreadId1 = osThreadCreate(osThread(T1), NULL);
ThreadId2 = osThreadCreate(osThread(T2), NULL);
ThreadId3 = osThreadCreate(osThread(T3), NULL);

	// timer definition
	osTimerDef(Thread1timer, osTimerCallback1);
	osTimerDef(Thread2timer, osTimerCallback2);
	//osTimerDef(Thread3timer, osTimerCallback3);

    	// timer creation
	osTimerId osTimer1 = osTimerCreate(osTimer(Thread1timer), osTimerOnce, NULL);
	osTimerId osTimer2 = osTimerCreate(osTimer(Thread2timer), osTimerOnce, NULL);
	//osTimerId osTimer3 = osTimerCreate(osTimer(Thread3timer), osTimerOnce, NULL);
		/* Start Timer */

	osTimerStart(osTimer1, 700);
	osTimerStart(osTimer2, 2100);

	//osTimerStart(osTimer3, 3000);


	semid = osSemaphoreCreate(osSemaphore(sem), 1);


// I’m wotking wit the CMSIS API, I don’t know how to translate it in freeRTOS // API.
// if timer3 is enabled, when pausing the debugger, the code executed is in kernel start

There is a doc provided by STM which could be helpful:
Developing applications on STM32Cube with RTOS

I think that I’ve solved!
configTOTAL_HEAP_SIZE was set to 4K,
I changed to 16K and now it works.
Thanks for your help.
Do you know of some issue related to increase TOTAL_HEAP_SIZE over 16K (using the heap4.c allocation scheme)?

I’m not aware of any issue with bumping configTOTAL_HEAP_SIZE until the linker complains that some section is overflowed/exceeded.

Recommend reading these pages - which talks about how to detect running out of heap space, stack overflow, etc.