From d977baa60ef4645de7fbb4177a3da239126afde0 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Thu, 2 Jul 2026 17:01:22 +0200 Subject: [PATCH] hal/mcxw: fix truncated empty-word sentinel empty_qword[0] was 0xFFFFFFF (7 nibbles), so a fully-erased 16-byte word never compared equal and was always reprogrammed. --- hal/mcxw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/mcxw.c b/hal/mcxw.c index 776c0ecf..6a06019c 100644 --- a/hal/mcxw.c +++ b/hal/mcxw.c @@ -155,7 +155,7 @@ int RAMFUNCTION hal_flash_write(uint32_t address, const uint8_t *data, int len) int w = 0; const uint32_t flash_word_size = 16; const uint32_t empty_qword[4] = { - 0xFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF }; while (len > 0) {