diff --git a/subsys/fs/fcb/fcb.c b/subsys/fs/fcb/fcb.c index 778df0f54a6..44358a8dbea 100644 --- a/subsys/fs/fcb/fcb.c +++ b/subsys/fs/fcb/fcb.c @@ -82,8 +82,7 @@ fcb_erase_sector(const struct fcb *fcb, const struct flash_sector *sector) return -EIO; } - rc = flash_area_erase(fcb->fap, sector->fs_off, sector->fs_size); - + rc = flash_area_flatten(fcb->fap, sector->fs_off, sector->fs_size); if (rc != 0) { return -EIO; } diff --git a/tests/subsys/fs/fcb/testcase.yaml b/tests/subsys/fs/fcb/testcase.yaml index e01566b6721..19e47e33a1b 100644 --- a/tests/subsys/fs/fcb/testcase.yaml +++ b/tests/subsys/fs/fcb/testcase.yaml @@ -12,6 +12,12 @@ tests: tags: flash_circural_buffer integration_platforms: - nrf52840dk/nrf52840 + filesystem.fcb.no_erase: + platform_allow: + - nrf54l15pdk/nrf54l15/cpuapp + filesystem.fcb.native_sim.no_erase: + extra_args: CONFIG_FLASH_SIMULATOR_EXPLICIT_ERASE=n + platform_allow: native_sim filesystem.fcb.native_sim.fcb_0x00: extra_args: DTC_OVERLAY_FILE=boards/native_sim_ev_0x00.overlay platform_allow: native_sim