2026-02-20 9:56 AM - edited 2026-02-20 3:02 PM
On an STM32U5G7VJTX I'm using a custom board with an ILI9488 480x320 display in 16-bit mode on the FMC.
I am using NemaGFX version 3.5.0 for the STM32U5x9 as I don't have STM32U5x7.
Drawing lines for a test works fine as long as I skip the nema_cl_wait() function, which hangs forever.
To give GPU2D time to finish the work, I replaced nema_cl_wait() with a short loop that takes enough time. But that's obviously not a good idea, as some tasks can take longer or shorter.
On the STM32U5G9J-DK2 Discovery kit the same GPU2D stuff runs just fine!
Is this because the GPU2D in the STM32U5G7VJTX isn't exactly the same as in the STM32U5G9ZJT6Q?
I've experimented with the GPU initialization in nema_hal.c, but without solving this issue.
Does anyone have any ideas?
/**
* @brief Draws a line
* [in] x1
* [in] y1
* [in] x2
* [in] y2
* @return None
*/
void Draw_Line(float x1, float y1, float x2, float y2)
{
/* Create GPU Command List */
Display.NemaGFX.cl = nema_cl_create_sized(8192);
/* Bind Command List */
nema_cl_bind_circular(&Display.NemaGFX.cl);
/* Bind Destination Texture */
nema_bind_dst_tex(Display.NemaGFX.fbo.bo.base_phys, Display.NemaGFX.fbo.w, Display.NemaGFX.fbo.h, Display.NemaGFX.fbo.format, Display.NemaGFX.fbo.stride);
/* Bind Foreground Texture - Do point sampling (default option) */
nema_bind_src_tex(Display.NemaGFX.fbo.bo.base_phys, Display.NemaGFX.fbo.w, Display.NemaGFX.fbo.h, Display.NemaGFX.fbo.format, Display.NemaGFX.fbo.stride, NEMA_FILTER_PS);
/* Set Blending */
nema_set_blend_fill(NEMA_BL_SIMPLE);
Display.NemaGFX.paint = nema_vg_paint_create();
nema_vg_paint_clear(Display.NemaGFX.paint);
nema_mat3x3_load_identity(Display.NemaGFX.m);
nema_vg_set_fill_rule(NEMA_VG_STROKE);
nema_vg_paint_set_type(Display.NemaGFX.paint, NEMA_VG_PAINT_COLOR);
nema_vg_paint_set_paint_color(Display.NemaGFX.paint, NemaGFX_Color.Stroke);
nema_vg_stroke_set_width(Display.Draw.Stroke_Width);
nema_vg_stroke_set_cap_style(Display.Draw.Start_Cap_Style, Display.Draw.End_Cap_Style);
nema_vg_set_blend(NEMA_BL_SRC_OVER | NEMA_BLOP_SRC_PREMULT);
nema_vg_draw_line(x1, y1, x2, y2, Display.NemaGFX.m, Display.NemaGFX.paint);
/* Submit CL for execution */
nema_cl_submit(&Display.NemaGFX.cl);
nema_cl_wait(&Display.NemaGFX.cl); /* Don't forget to enable GPU2D interrupts! */
nema_cl_destroy(&Display.NemaGFX.cl);
nema_vg_paint_destroy(Display.NemaGFX.paint);
}
Solved! Go to Solution.
2026-02-20 12:50 PM
Update: I fixed it!
I enabled the general GPU interrupt and the error interrupt, which I completely forgot.
I hope this helps someone else.
2026-02-20 12:50 PM
Update: I fixed it!
I enabled the general GPU interrupt and the error interrupt, which I completely forgot.
I hope this helps someone else.