2020-07-08 09:18 AM
Hello, I have created one basic project with STM32F746ZG and touchgfx. When I ran my code, In starting only its getting stuck at freeRTOS function vPortRaiseBASEPRI. After debug I found that code asserted at below line of function xQueueSemaphoreTake of queue.c.
/* Check this really is a semaphore, in which case the item size will be
0. */
configASSERT( pxQueue->uxItemSize == 0 );
This function is getting called by OSWrapper.cpp function tryTakeFrameBufferSemaphore. Here we are trying to take Semaphore "frame_buffer_sem". So in simple words value of frame_buffer_sem. uxItemSize is odd like 480.
When I debug more, I found during initialization(OSWrappers::initialize) of Semaphore has all correct values but seems like after sometime its getting all data corrupted.
I am really not sure how heap memory is getting corrupted as I just generated code from touchgfx and STM32CubeMX. My heap size is 32768 bytes.
Below are the screen shot of memory allocated for Semaphore "frame_buffer_sem"
After Initializing:
At function tryTakeFrameBufferSemaphore call:
Note : 0x200004c0 is address of Semaphore "frame_buffer_sem" .
Clearly heap data is getting corrupted.
Below is the stack level
Any help?
2020-07-11 01:42 AM
Hello,
CLK, lines, pixels are not the same. Look at the tiny note under the table. But there's relation between a cycle and a line or pixel.
Anyway, from my understanding I think your CubeMX settings are correct.
I don't think 9.6 MHz instead of 9 MHz will make a difference. But you can still try to change it if you see that it does not work.
/Alexandre
2020-07-11 02:11 AM
Helllo, If CLK, lines, pixels value is not same , than why using same value mentioned at datasheet is correct ? For example Horizontal front porch is mentioned as 2CLK and we are also addding 2 pixels at setting in CubeMX.
Please elaborate.
2020-07-11 04:47 AM
9,6M / 525px / 286ln = around 64Hz refresh then next critical info is polarity of sync and clock for LCD as i say on page 9 is graph signal too.
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
only my example you need set your polarity.
And when your MCU is slow or ram ... try half of 9,6MHz as ltdc clock maybe 4,8
2020-07-11 06:58 AM
I think 64Hz i need to set somewhere in Touchgfx but unable to find correct location, Can you help ?
Also in Touchfgfx I need to set LCD RESET PIN XRES but there is reset pin in LCD.
Thanks
2020-07-13 01:52 AM
@Alexandre RENOUX
Also in Touchfgfx I need to set LCD RESET PIN XRES but there is reset pin in LCD. Can you suggest.
2020-07-14 10:15 PM
@Alexandre RENOUX did you get the chance to check ?
2020-07-15 09:56 AM
When you dont have reset on LCD simply set unused port pin here.
2020-07-15 10:05 AM
ok, Also above we was discussing to add display refresh as 64Hz, but unable to find correct location in touchgfx setting Can you help ?
2020-07-20 03:51 AM
Hello,
As MM..1 said, the LCD-TFT clock at 9,6 MHz indicates already that the LTDC will try to transfer the framebuffer to the screen at 64 Hz (called display refresh in you sentence).
If you want to change the display refresh, changing this value should be enough.
/Alexandre
2020-07-20 03:56 AM
Hello,
What version of CubeMX are you using ?
TouchGFX is now an additional software, you shouldn't have GRAPHICS in the Middleware tab anymore.
Please use the newest version 5.6.1 (6.0.0 is coming in a couple of weeks)
/Alexandre