From 19f6f540ecc57ca70cf73ac8ffb7ca9f292fcfb0 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Wed, 7 May 2025 11:43:06 +0300 Subject: [PATCH 1/2] boot: Add DFU partition delay setting. Allows setting a custom delay for DFU partition. This should be set to ensure control transfers don't timeout if erasing the partition takes too long. By default, this is 0 for all partition types. Signed-off-by: iabdalkader --- boot/include/port.h | 1 + boot/src/common/dfu.c | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/boot/include/port.h b/boot/include/port.h index 89c6c26dd..6c6643e7e 100644 --- a/boot/include/port.h +++ b/boot/include/port.h @@ -68,6 +68,7 @@ typedef struct { uintptr_t start; uintptr_t limit; uint32_t attr; + uint32_t delay; } partition_t; typedef enum { diff --git a/boot/src/common/dfu.c b/boot/src/common/dfu.c index a268ac6ca..41e55fff4 100644 --- a/boot/src/common/dfu.c +++ b/boot/src/common/dfu.c @@ -46,13 +46,10 @@ void tud_dfu_detach_cb(void) { // or before tud_dfu_manifest_cb() (state=DFU_MANIFEST). uint32_t tud_dfu_get_timeout_cb(uint8_t itf, uint8_t state) { tud_dfu_detached = false; + const partition_t *p = &OMV_BOOT_DFU_PARTITIONS[itf]; if (state == DFU_DNBUSY) { - if (itf < 3) { - return 0; - } else { - return 100; - } + return p->delay; } else if (state == DFU_MANIFEST) { return 0; } From aee3b67be9e9b1d5739924cb9de5fc84d0859273 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Wed, 7 May 2025 14:00:12 +0300 Subject: [PATCH 2/2] boards/OPENMV_AE3: Update romfs config. --- boards/OPENMV_AE3/romfs.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/boards/OPENMV_AE3/romfs.json b/boards/OPENMV_AE3/romfs.json index 4667229b3..58c643091 100644 --- a/boards/OPENMV_AE3/romfs.json +++ b/boards/OPENMV_AE3/romfs.json @@ -22,13 +22,7 @@ }, { "type": "tflite", - "path": "{TOP}/lib/models/yolo_v5_224_nano.tflite", - "alignment": 16, - "optimize": "Performance" - }, - { - "type": "tflite", - "path": "{TOP}/lib/models/person_detect.tflite", + "path": "{TOP}/lib/models/yolo_v2_224_small.tflite", "alignment": 16, "optimize": "Performance" },