2020-12-10 03:40 AM
My HW is NUCLEO-F446RE and X-NUCLEO-GFX01M1.
TouchGFX is configured in partial frame buffer (3x1920 bytes)
In the project I use FreeRTOS API CMSIS V2.
The assert in question occurs randomly:
assertion "state[nextSendingBlock] == DRAWN" failed:
file "../Middlewares/ST/touchgfx/framework/include/touchgfx/hal/FrameBufferAllocator.hpp",
line 241,
function: const touchgfx::Rect& touchgfx::ManyBlockAllocator<block_size, blocks, bytes_pr_pixel>::peekBlockForTransfer()
[with long unsigned int block_size = 1920; long unsigned int blocks = 3; long unsigned int bytes_pr_pixel = 2]
When the assert occurs, the state fields are all EMPTY.
2020-12-14 04:09 AM
Hi @Martin KJELDSEN ,
no support on this problem?
Best regards
/Antonello
2020-12-14 06:07 AM
Hey. Busy busy with 4.16.0 release.
Let me take a look at that. When does that happen? has the application been running for a while? I'll need some more information to help you.
/Martin
2020-12-14 06:33 AM
Hi Martin,
thanks for the support and I am sorry to take your precious time for 4.16.0 release which, of course, I am anxious to use
The project is based on FreeRTOS (CubeIDE) and there are other tasks, in particular one dedicated to the transmission of messages via CAN BUS.
The problem occurs 90% of the time at startup and at the end of the animation. Consider that the animation is the same as the online demo for the NUCLEO-G071RB where I changed the images.
While waiting for the support I created the following workaround in Middlewares/ST/touchgfx/framework/include/touchgfx/hal/FrameBufferAllocator.hpp:
virtual const Rect& peekBlockForTransfer()
{
int nextSendingBlock = sendingBlock + 1;
int foo = 0;
if (nextSendingBlock == blocks)
{
nextSendingBlock = 0;
}
if (state[nextSendingBlock] != DRAWN)
{
foo++;
state[nextSendingBlock] = DRAWN;
}
assert(state[nextSendingBlock] == DRAWN);
return blockRect[nextSendingBlock];
}
With this and with a breakpoint in "foo++" the execution with the debugger continues, but only if I break for a least three cycles. If I remove the breakpoint it crashes.
I am available for any clarification/detail you need.
/Antonello
2020-12-14 07:08 AM
Don't be sorry! Thanks for the info :) I'll look at it tomorrow.
2020-12-22 01:05 AM
Hi.
I think Martin Kjeldsen is out of the office at moment for Christmas vacation.
Can you provide a stack trace when you hit the assert? This is to know if we are coming from the interrupt context.
Thanks
2021-01-03 11:20 PM
Hi and happy New Year !
@Flemming Gram CHRISTENSEN I have attached the image with the stack and the contents of the state vector.
Thanks
2021-01-05 07:32 AM
Thanks. We're trying to reproduce is here - This is not the first time we've heard about someone having issues with PFB and RTOS.
2021-01-13 12:27 AM
Update:
We found a logic bug that would cause this issue. We have a fix ready for 4.16.1 which should be out end of January.
/Martin
2024-03-21 08:46 AM
Same problem with version 4.23.2
TouchGFX is configured in partial frame buffer 3x4000 bytes.
TouchGFX Task StackSize is 4096 bytes