From fdfebdd15b89f6c16d441372ddac9b8d4e3df62a Mon Sep 17 00:00:00 2001 From: Andrej Butok Date: Mon, 17 Jun 2024 12:49:12 +0200 Subject: [PATCH] soc: lpc: mcxn: fix the flash_fill() fail. - Fix flash_fill() for lpc55 and mcxnx4. - Set FLASH_FILL_BUFFER_SIZE to the minimal size of data which can be written to a device (by default is only 32). - Fix the [flash_map.test_flash_area_erase_and_flatten] failed test of tests/subsys/storage/flash_map. Signed-off-by: Andrej Butok --- soc/nxp/lpc/lpc55xxx/Kconfig.defconfig | 4 ++++ soc/nxp/mcx/mcxnx4x/Kconfig.defconfig | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/soc/nxp/lpc/lpc55xxx/Kconfig.defconfig b/soc/nxp/lpc/lpc55xxx/Kconfig.defconfig index 80f20ada986..569d6c0e4a7 100644 --- a/soc/nxp/lpc/lpc55xxx/Kconfig.defconfig +++ b/soc/nxp/lpc/lpc55xxx/Kconfig.defconfig @@ -38,6 +38,10 @@ config LPC55XXX_SRAM_CLOCKS config LPC55XXX_USB_RAM default y +# Set to the minimal size of data which can be written. +config FLASH_FILL_BUFFER_SIZE + default 512 + if SOC_LPC55S06 config LPC55XXX_USB_RAM diff --git a/soc/nxp/mcx/mcxnx4x/Kconfig.defconfig b/soc/nxp/mcx/mcxnx4x/Kconfig.defconfig index cf464656374..c108869cf6e 100644 --- a/soc/nxp/mcx/mcxnx4x/Kconfig.defconfig +++ b/soc/nxp/mcx/mcxnx4x/Kconfig.defconfig @@ -20,4 +20,8 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC default 16000 if MCUX_LPTMR_TIMER default 150000000 if CORTEX_M_SYSTICK +# Set to the minimal size of data which can be written. +config FLASH_FILL_BUFFER_SIZE + default 128 + endif # SOC_SERIES_MCXNX4X