From 350bc72ef3676e95507b1521f6902ec5d0c0546c Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Fri, 23 Oct 2026 13:13:42 -0500 Subject: [PATCH 1/2] fix(dfu): buffer 16 pending packets during lazy erase --- changelog.md | 1 + lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 8849f2502..b0fbdeecb 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ it and is upstream Adafruit history, kept for provenance. - The DFU screen shows upload progress during UF2, serial, and BLE transfers, as a bar in place of the banner. The title reads BOOTLOADER during a bootloader update, ERASE during a factory erase, WRONG FILE for a UF2 this board cannot take, and NO FIRMWARE when DFU starts without a valid application. - A DFU session started after a SoftDevice update no longer ends before it begins. - Build change, no behavior change: the bootloader is now compiled with `-flto`, which shrinks every image by about 3.3 KB of flash. Section addresses and SoftDevice call sites are unchanged. +- The lazy-erase packet buffer holds 16 packets instead of 8, so an Android transfer at PRN 10 with 244-byte packets is no longer refused with `NO_MEM` while a page erases. Costs about 2 KB of `.bss`. ## OTAFIX 2.5 diff --git a/lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c b/lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c index 6e92bc26a..bf6e46331 100644 --- a/lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c +++ b/lib/sdk11/components/drivers_nrf/pstorage/pstorage_raw.c @@ -48,7 +48,7 @@ #endif #define PENDING_PACKET_SIZE 256 /**< Maximum size of a single pending packet data buffer. */ -#define PENDING_PACKET_COUNT 8 /**< Maximum number of packets that can be buffered during lazy erase. */ +#define PENDING_PACKET_COUNT 16 /**< Packets buffered during lazy erase; must exceed the largest client PRN interval (Android 10, Apple 8). */ uint8_t * dfu_page_erased; /**< Pointer to page erased status array, set by DFU layer. */ uint32_t dfu_image_page_count; /**< Number of pages in DFU image, set by DFU layer. */ From e29ea037fa574714ba2ae4991cf41aea2c553560 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:35:32 -0500 Subject: [PATCH 2/2] docs: state the pending-ring change as capacity --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index b0fbdeecb..520294b02 100644 --- a/changelog.md +++ b/changelog.md @@ -11,7 +11,7 @@ it and is upstream Adafruit history, kept for provenance. - The DFU screen shows upload progress during UF2, serial, and BLE transfers, as a bar in place of the banner. The title reads BOOTLOADER during a bootloader update, ERASE during a factory erase, WRONG FILE for a UF2 this board cannot take, and NO FIRMWARE when DFU starts without a valid application. - A DFU session started after a SoftDevice update no longer ends before it begins. - Build change, no behavior change: the bootloader is now compiled with `-flto`, which shrinks every image by about 3.3 KB of flash. Section addresses and SoftDevice call sites are unchanged. -- The lazy-erase packet buffer holds 16 packets instead of 8, so an Android transfer at PRN 10 with 244-byte packets is no longer refused with `NO_MEM` while a page erases. Costs about 2 KB of `.bss`. +- The lazy-erase packet buffer holds 16 packets instead of 8. Costs about 2 KB of `.bss`. ## OTAFIX 2.5