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-10 05:21 AM
Yes porch numbers is one point , but your schematc is RGB666 or 18bit LTDC interface. You can config it and framebuffer RGB565 or RGB888.
2020-07-10 05:39 AM
Hello,
The back porch and front porch are supposed to be on the LCD datasheet. I don't think you can find them elsewhere. It's quite strange that you cannot find these values.
Or else if you have code examples of this screen being used, you can refer to that as the values should be the same.
/Alexandre
2020-07-10 06:33 AM
Hello,
TIM6 is necessary to maintain the stability of the app. This way both the HAL and the OS don't use the same timebase.
TIM6 is for HAL while SysTick is for the OS (here FreeRTOS).
/Alexandre
2020-07-10 08:37 AM
2020-07-10 10:56 AM
@Alexandre RENOUX Did you get the chance to check?
2020-07-10 11:55 AM
In datasheet X043DTLT is all polarity and timing porch info on page 9.
2020-07-10 10:37 PM
Yes In software I am sending low on R2,B2 lines. Basically I want to saved size of external flash and RAM so choosing RGB565.
2020-07-10 10:37 PM
@MM..1 Thanks for replay. Actually I am first time working on LCD so kinda confused.
I checked page 9, but there data is in CLK(HZ) but I need to mention it in pixels for horizontal and lines for vertical. Can you please help me understand it?
2020-07-10 11:55 PM
Hello,
I looked at the two datasheet and I don't seem to find any relevant info for porch for the 5'' screen 800*480.
On the other hand, like MM..1 mentioned, the screen with a resolution of 480*272px has a table regarding that.
You can see that Horizontal display period = 480 and Vertical display period = 272 which matches the resolution.
Therefore I guess that :
Horizontal front porch is 2 pixels
Horizontal Back porch is 2 pixels
An same for vertical.
Horizontal Synchronization in CubeMX would correspond to Horizontal pulse width and same for Vertical.
/Alexandre
2020-07-11 01:00 AM
Thanks @Alexandre RENOUX , So you are saying below is correct data for 480*272 ?
My input clock is 9.6 to LCD, but these values ate for 9MHZ.
Also CLK, pixels , lines are same unit?