zephyr/drivers/flash/Kconfig.stm32
Francois Ramu cb7ed8d97d drivers: flash: stm32 flash driver has a Kconfig STM32_MEMMAP
This CONFIG_STM32_MEMMAP is for enabling the MemoryMapped mode
on external octo or quad spi memory.
In this case, the flash_stm32_read is done in mem map mode
the flash_stm32_erase is not available.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-05-16 15:52:01 +02:00

83 lines
2.5 KiB
Plaintext

# ST Microelectronics STM32 MCUs Flash driver config
# Copyright (c) 2016 RnDity Sp. z o.o.
# Copyright (c) 2017 BayLibre, SAS
# Copyright (c) 2022 Linaro Limited
# Copyright (c) 2023 Google Inc
# SPDX-License-Identifier: Apache-2.0
config SOC_FLASH_STM32
bool "STM32 flash driver"
depends on DT_HAS_ST_STM32_FLASH_CONTROLLER_ENABLED
select FLASH_HAS_DRIVER_ENABLED
default y
select FLASH_HAS_PAGE_LAYOUT
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
select USE_STM32_HAL_FLASH if BT_STM32WBA
select USE_STM32_HAL_FLASH_EX if BT_STM32WBA
help
Enable flash driver for STM32 series
if SOC_FLASH_STM32
config FLASH_STM32_WRITE_PROTECT
bool "Extended operation for flash write protection control"
depends on SOC_SERIES_STM32F4X
select FLASH_HAS_EX_OP
default n
help
Enables flash extended operation for enabling/disabling flash write
protection.
config FLASH_STM32_WRITE_PROTECT_DISABLE_PREVENTION
bool "Prevent from disabling flash write protection"
depends on FLASH_STM32_WRITE_PROTECT
default n
help
If enabled, all requests to disable flash write protection will be
blocked.
config FLASH_STM32_READOUT_PROTECTION
bool "Extended operation for flash readout protection control"
depends on SOC_SERIES_STM32F4X || SOC_SERIES_STM32L4X || SOC_SERIES_STM32G4X
select FLASH_HAS_EX_OP
default n
help
Enables flash extended operation for enabling/disabling flash readout
protection.
config FLASH_STM32_READOUT_PROTECTION_DISABLE_ALLOW
bool "Allow disabling readout protection"
depends on FLASH_STM32_READOUT_PROTECTION
default n
help
With this option enabled it will be possible to disable readout
protection. On STM32 devices it will trigger flash mass erase!
config FLASH_STM32_READOUT_PROTECTION_PERMANENT_ALLOW
bool "Allow enabling readout protection permanently"
depends on FLASH_STM32_READOUT_PROTECTION
default n
help
With this option enabled it will be possible to enable readout
protection permanently.
config FLASH_STM32_BLOCK_REGISTERS
bool "Extended operation for blocking option and control registers"
select FLASH_HAS_EX_OP
default n
help
Enables flash extended operations that can be used to disable access
to option and control registers until reset. Disabling access to these
registers improves system security, because flash content (or
protection settings) can't be changed even when exploit was found.
config STM32_MEMMAP
bool "NOR Flash in MemoryMapped for XiP"
depends on XIP
help
This option enables the XIP mode for the external NOR flash
mounted on STM32 boards.
endif # SOC_FLASH_STM32