zephyr/samples/subsys/nvs/Kconfig
Andrej Butok 94c9cc98a9 sample: nvs: add NVS sample Kconfig
- adds the ability to change the NVS sample "Maximum reboot counter",
  "Reboot countdown" and its "Sleep time" parameters via Kconfig,
  without manually modifying the source code.
- reduces the default number of resets to 5 (was 400).
- adds the ability to reduce flash memory wear on real devices
  by reducing the number of write iterations.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-03-17 13:57:54 +01:00

29 lines
741 B
Plaintext

# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0
mainmenu "NVS Sample Configuration"
config NVS_SAMPLE_MAX_REBOOT
int "Maximum reboot counter value"
default 5
range 1 1000
help
Maximum number of reboots to perform before resetting the counter.
config NVS_SAMPLE_REBOOT_COUNTDOWN
int "Reboot countdown value (in iterations)"
default 5
range 1 60
help
Number of countdown iterations to wait before rebooting the device.
Each iteration takes NVS_SAMPLE_SLEEP_TIME milliseconds.
config NVS_SAMPLE_SLEEP_TIME
int "Sleep time between reboot countdown iterations (in milliseconds)"
default 100
range 10 10000
help
Duration in milliseconds to sleep between reboot countdown iterations.
source "Kconfig.zephyr"