cancel
Showing results for 
Search instead for 
Did you mean: 

Code is getting stuck at vPortRaiseBASEPRI after using Touchgfx

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.

0693W000001sSfFQAU.jpg

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:

0693W000001sSdwQAE.jpg

At function tryTakeFrameBufferSemaphore call:

0693W000001sSf4QAE.jpg

Note : 0x200004c0  is address of Semaphore "frame_buffer_sem" .

Clearly heap data is getting corrupted.

Below is the stack level

0693W000001sSfOQAU.jpg

Any help?

33 REPLIES 33
Alexandre RENOUX
Principal

Hello,

Maybe you can look at the Application Template STM32F746G-DISCO for some reference and comparison. It's available on TouchGFX Designer.

/Alexandre

Hello, Yes I did. Its same code. Not able to find reason for it. Doesn't seem like this issue is related to external SDRAM or flash.

MM..1
Chief III

try in boardconfig use nodma

//STM32F7DMA dma;

NoDMA dma;

Compile time error "NoDMA dma;'

MM..1
Chief III

/* USER CODE BEGIN user includes */

#include <touchgfx/hal/NoDMA.hpp>

Thanks, it compiled. I don't have board with me right now. I will update you tomorrow.

Post changing to NoDMA I am getting hard fault due to TIMER6. I am not using TIMER6 any where. Does Touchgfx needs it?

0693W000001sauvQAA.jpg

Last trace is highlighted line

0693W000001savFQAQ.jpg

I created one new project and now its working but I m observing some issue with color and few areas like circle, it came like bit odd on screen.

Btw now i am using RGB565 format so below is my new LCD Connector schematic. Please check if this is correct.

0693W000001sbbzQAA.jpg

Is this due to HorizontalSync, VerticalSync, porch ? How should i get correct value of these parameter as unable to find it LCD datasheet.