zephyr/drivers/flash/Kconfig.mcux
Andrei Gansari 0d5e9f9620 drivers: soc_flash_mcux check before reading
LPC55xxx SoCs don't allow reading erased areas, the flash memory
controller (FMC) will trigger an ECC error for that area. To prevent
reading unwritten areas the low level FMC command of margin checking is
used, this will fail if the area to be read is not correctly written
(margin_check) or area is erased (blank_check).
In the case of an erased page, we return dummy data so the application
can program that area.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-07-09 11:28:25 +02:00

26 lines
843 B
Plaintext

# SPDX-License-Identifier: Apache-2.0
config SOC_FLASH_MCUX
bool "MCUX flash shim driver"
depends on (HAS_MCUX_FTFX || HAS_MCUX_IAP)
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
help
Enables the MCUX flash shim driver.
WARNING: This driver will disable the system interrupts for
the duration of the flash erase/write operations. This will
have an impact on the overall system performance - whether
this is acceptable or not will depend on the use case.
if SOC_FLASH_MCUX
config CHECK_BEFORE_READING
bool "Verify area before reading it"
default y if SOC_SERIES_LPC55XXX
help
Do a margin check flash command before reading an area.
This feature prevents erroneous/forbidden reading. Some ECC enabled
devices will crash when reading an erased or wrongly programmed area.
endif # SOC_FLASH_MCUX