2023-06-17 05:39 AM
I am currently working on the STM32H750VB custom board where 16 bpp RGB LCD Interface is used. After sending the data for couple of times successfully on the LCD screen, it stops displaying the data. On debugging, I found out that it gets stuck on configASSERT( pxQueue->uxItemSize == 0 ) called from xQueueSemaphoreTake().
As I am new to freertos and TouchGFX, can you please provide me the insight to find the root cause?
2023-06-23 08:49 AM - edited 2023-06-23 08:50 AM
Hello
Seems that you are just defining pointer to your structure
uart_Data *uart_Struct;
but never allocate memory for it ?
Thats maybe to root cause of your problems. You can add the memory allocation or just make it static by removing '*' on both declaration (main.c and model.cpp).
then probably this line on model.cpp
if (osMessageQueueGet(uartQueueHandle, &uart_Model[10], 0, 0) == osOK)
should be
if (osMessageQueueGet(uartQueueHandle, &uart_Model, 0, 0) == osOK)
or
if (osMessageQueueGet(uartQueueHandle, uart_Model, 0, 0) == osOK)
depending how you will improve the uart_model- stucture declaration
Maybe this helps you forward :thumbs_up:
2023-06-24 02:35 AM
2023-06-25 10:51 PM - edited 2023-06-26 04:54 AM
I tried what you said without using '*' but it didn't work the problem remains the same.
I send you the flow of it I hope it will help you to understand the problem.
2023-06-26 09:26 AM - edited 2023-06-26 09:27 AM
Hello. Could you now publish your latest main.c, main.h and model.cpp ?
2023-06-26 09:42 PM
Ok, I send you the link.
2023-06-27 11:02 AM - edited 2023-06-27 11:03 AM
Hello. Test with these, I little bit fix to stucture handling on put and get queue. And remove continuos initializing of HAL_UARTEx_ReceiveToIdle_IT at DefaultTask. Since I cant run your code it cannot be verified it 100%.
If its still hanging, try to comment out putting messages to queue, retrieving from queue etc until you find which operation is causing the problem. Your principle of using queue's should work fine since I build as practice a simple serial terminal on the TGFX which shows received strings from uart with queue from main.c. It also sends some test strings from UI button handler to model and then to other os process with TX queue.
2023-06-28 02:32 AM
I tried commenting out the queues messages and check it using debug the problem remains the same and please check the Semaphore once .I send you my project again.
2023-06-28 03:56 AM
Try start over. 1.Is your code real multithread? 2. Is your MCU real multicore? 3.Is your data uart used only on screen show? usw...
Real use of queues semaphores is required only when your 1. YES 2. YES ...
If i good rememmber UART examples use model get queue data and ISR send queue data. Here cn exist two situation A. Your buff between two model gets is ok filled B. is overflowed
Try STM32 UART Ring Buffer using DMA and IDLE Line - YouTube
2023-07-01 04:47 AM - edited 2023-07-01 04:48 AM
Hello
Seems that your framebuffer needs 768 000 byte (800x480x2 byte(16 bit)) and you have place is it 512Kbyte area in SRAM (starting from 0x24000000) so its overflowing. Maybe you could reduce Y resolution so that it fits in 512 K and see does it help to the lock ups.(or use partial framebuffer or reduce color count to 256).
2023-07-02 09:53 PM - edited 2023-07-02 09:55 PM
I have already reduced my Y resolution. My framebuffer size is(800x300x2 byte(16 bit)) so it comes in the range of 512Kbyte. Even I tried to make the resolution size very small but it did not help.