2021-08-23 07:02 PM
I used cubemx to configure the DMA2D,LDTC ,DSIHOST, GFXMMU,and FreeRTOS. I have two threads configured as follows
const osThreadAttr_t Logic_ProcessTask_attributes = {
.name = "Logic_ProcessTask",
.priority = (osPriority_t) osPriorityBelowNormal,
.stack_size = 1024 * 1
};
const osThreadAttr_t GuiTask_attributes = {
.name = "GuiTask",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 4096 * 4
};
void StartGuiTask(void *argument)
{
MX_TouchGFX_Process();
for(;;)
{
osDelay(1);
}
}
The logical tasks are as follows:
void Logic_ProcessTask(void *argument)
{
static unsigned int msCount = 0;
/* Infinite loop */
for(;;)
{
msCount++;
if(msCount % 100 == 0)
{
HAL_GPIO_TogglePin(LED_GPIO_Port,LED_Pin); //Toggel LED
}
osDelay(1);
}
}
The content of the gui task is to display the time, which is generated by TouchGFX Designer。
When I don’t create the Logic_ProcessTask, the StartGuiTask is working OK。 but When I created the Logic_ProcessTask, the StartGuiTask task sometimes crashes.
I debugged and found that when the StartGuiTask crashed, the OSWrappers::signalVSync()
is working,but the OSWrappers::waitForVSync() is not executed。 I don't know why。
Thanks a lot
2021-09-09 01:47 AM
Hi,
Digging this up. Have you been able to fix your issue ? On which mcu were you working ? I seem to have faced the same thing with a STM32L4R9dk.
/Romain
2021-09-09 10:32 PM
Thank you very much for your answer. The mcu I use is STM32L4R9VGT6. Our design scheme is the reference STM32L4R9I-disco .I tried many methods, but I couldn’t solve it,If this problem occurs, is there any way to recover it?
2021-09-10 03:12 AM
Wasn't there some issue with the pins in the schematic, vs those in the code defines of the bsp?
The TE pin? Off by one.
Will fish when back on a computer..
2021-09-12 09:02 PM
Thank you very much for your answer. I tested it. When I used the above example on the STM32L4R9I-disco, it was normal when I didn't add my simple thread. When I added it, it sometimes crashed.When I added a simple thread, I checked it, and the stack did not overflow. The simple thread was running normally, but the Show crashed. My simple thread is as follows
unsigned int test_val;
for(;;)
{
test_val++;
if(test_val >= 1000)
test_val = 0;
osDelay(1);
}
I will try to re-port it completely, hoping to find the problem.