From 89d60c800264d478d3ec13b1ec57a0d2fec8163c Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Sun, 22 Jun 2025 20:02:53 -0700 Subject: [PATCH] ports/stm32: Add missing init bits to fix glitches. --- ports/stm32/stm32_nema.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/stm32/stm32_nema.c b/ports/stm32/stm32_nema.c index 10eff4b81..dc2f6be61 100644 --- a/ports/stm32/stm32_nema.c +++ b/ports/stm32/stm32_nema.c @@ -40,7 +40,7 @@ #define OMV_GPU_NEMA_RING_SIZE 1024 #endif -volatile static int last_cl_id; +volatile static int last_cl_id = -1; static GPU2D_HandleTypeDef gpu2d = { 0 }; static nema_ringbuffer_t ring_buf = {{0}}; #if OMV_GPU_NEMA_MM_STATIC @@ -74,6 +74,8 @@ int32_t nema_sys_init(void) { return -1; } + last_cl_id = -1; + NVIC_SetPriority(GPU2D_IRQn, IRQ_PRI_GPU); NVIC_EnableIRQ(GPU2D_IRQn);