From e25ee48874b39f2c47504a651accaa0bdc9cba5b Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Sun, 21 Sep 2025 22:52:21 +0200 Subject: [PATCH] ports/alif: Handle pending events during inference. Ensures pending events get serviced more often. Signed-off-by: iabdalkader --- ports/alif/alif_npu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/alif/alif_npu.c b/ports/alif/alif_npu.c index d14e0fc16..ec04c0513 100644 --- a/ports/alif/alif_npu.c +++ b/ports/alif/alif_npu.c @@ -35,6 +35,8 @@ #include CMSIS_MCU_H #include "py/mphal.h" +#include "py/runtime.h" + #include "alif_hal.h" #include "omv_boardconfig.h" #include "ethosu_driver.h" @@ -150,11 +152,11 @@ uint64_t ethosu_address_remap(uint64_t address, int index) { } void ethosu_inference_begin(struct ethosu_driver *drv, void *user_arg) { - + mp_handle_pending(false); } void ethosu_inference_end(struct ethosu_driver *drv, void *user_arg) { - + mp_handle_pending(false); } void ETHOSU_IRQ_HANDLER(void) {