zephyr/drivers/flash/Kconfig.simulator

75 lines
2.0 KiB
Plaintext

# Flash simulator config
# Copyright (c) 2018 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
menuconfig FLASH_SIMULATOR
bool "Flash simulator"
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
help
Enable the flash simulator.
if FLASH_SIMULATOR
config FLASH_SIMULATOR_UNALIGNED_READ
bool "Allow read access to be unaligned"
default y
help
If selected, the reading operation does not check if access is aligned.
Disable this option only if you want to simulate
a specific FLASH interface that requires aligned read access.
config FLASH_SIMULATOR_DOUBLE_WRITES
bool "Allow program units to be programmed more than once"
help
If selected, writing to a non-erased program unit will succeed, otherwise, it will return an error.
Keep in mind that write operations can only pull bits to zero, regardless.
config FLASH_SIMULATOR_SIMULATE_TIMING
bool "Hardware timing simulation"
if FLASH_SIMULATOR_SIMULATE_TIMING
config FLASH_SIMULATOR_MIN_READ_TIME_US
int "Minimum read time (µS)"
default 2
range 1 1000000
config FLASH_SIMULATOR_MIN_WRITE_TIME_US
int "Minimum write time (µS)"
default 100
range 1 1000000
config FLASH_SIMULATOR_MIN_ERASE_TIME_US
int "Minimum erase time (µS)"
default 2000
range 1 1000000
endif
config FLASH_SIMULATOR_STATS
bool "flash operations statistic"
default y
select STATS
select STATS_NAMES
help
Gather statistic measurement for flash simulator operations using the
statistic subsystem.
config FLASH_SIMULATOR_STAT_PAGE_COUNT
int "Pages under statistic"
depends on FLASH_SIMULATOR_STATS
range 1 256
default 256
help
Only up to this number of beginning pages will be tracked
while catching dedicated flash operations and thresholds.
This number is not automatic because implementation uses
UNTIL_REPEAT() macro, which is limited to take explicitly
number of iterations.
This is why it's not possible to calculate the number of pages with
preprocessor using DT properties.
endif # FLASH_SIMULATOR