emwin with freeRTOS

jimmjimm wrote on Monday, October 20, 2014:

Hi, guys
i try to use emwin and freeRTOS on my stm32f4 board, but i found something really wired

I found the task include emwin function(like WM_Exec(),GUI_TOUCH_Exec() or GUI_DispStringAt()) can not work with any another tasks even its empty task
but when i only run emwin task the system works fine.

i make macro GUI_OS is 1 GUI_MAXTASKis 5 emwin memory to 64k bytes
freeRTOS heap size from 90k bytes
system heap and stack size to 8k bytes

this is maximum ram i can provide but the system still not works

some one can help me?

jimmjimm wrote on Wednesday, October 22, 2014:

anyone?

rtel wrote on Wednesday, October 22, 2014:

I’m afraid I’m not familiar with emWin so don’t know what resources it is using.

I can only suggest the normal things. Ensuring you are using a recent version of FreeRTOS with configASSERT() defined may help detect something amiss. Otherwise I can only assume that the task running emWin is consuming all the CPU time and not letting anything else run. Have you tried running the emWin task at the lowest priority, or using the trace tool to see what is going on?

Regards.

jimmjimm wrote on Monday, October 27, 2014:

I try to run emwin task at lowest priority but not work, all i got is system get hardfault at last step of vtaskdelay

jimmjimm wrote on Monday, October 27, 2014:

i found the problem!!!
i did not replace three handlers in startup file just replace handlers like this:
void PendSV_Handler(void)
{
xPortPendSVHandler();
}
its too stupid that i thought its same.

vijitron wrote on Monday, April 11, 2016:

Hi Jimmy
I do have this same problem ,i couldnt find the PendSV_Handler(); What is this for?
Anyone help me

davedoors wrote on Monday, April 11, 2016:

have a look in FreeRTOSConfig.h. PendSV_Handler() might be defined to xPortPendSVHandler() as mentioned here http://www.freertos.org/FAQHelp.html