This is an automated email from the ASF dual-hosted git repository.
kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 2591e9e16 bsp/lpcxpresso55s28: Call FLASH_Init before FFR_Init
2591e9e16 is described below
commit 2591e9e1690456ca9041b60c4e4b9d178241997b
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Wed Oct 14 11:00:48 2026 +0200
bsp/lpcxpresso55s28: Call FLASH_Init before FFR_Init
hal_bsp_init() called FFR_Init() with zeroed flash_config_t. ROM FFR
functions use flash geometry that is filled in by FLASH_Init(), so
later hal_bsp_hw_id() -> FFR_GetUUID() ended in divide by zero usage
fault inside ROM. This happens to any application that reads hardware
id, e.g. USB network glue that derives MAC address from it.
Call FLASH_Init() on the same config before FFR_Init() as NXP SDK
drivers do.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jerzy Kasenberg <[email protected]>
---
hw/bsp/lpcxpresso55s28/src/hal_bsp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/bsp/lpcxpresso55s28/src/hal_bsp.c
b/hw/bsp/lpcxpresso55s28/src/hal_bsp.c
index 42b84ee58..320ccfa6c 100644
--- a/hw/bsp/lpcxpresso55s28/src/hal_bsp.c
+++ b/hw/bsp/lpcxpresso55s28/src/hal_bsp.c
@@ -123,6 +123,8 @@ hal_bsp_init(void)
(void)rc;
+ /* FFR functions use flash geometry filled in by FLASH_Init() */
+ FLASH_Init(&config);
FFR_Init(&config);
#if MYNEWT_VAL(TIMER_0)