2019-11-01 13:45:29 +01:00
|
|
|
# ST Microelectronics STM32 MCUs Flash driver config
|
|
|
|
|
2016-11-02 15:34:02 +01:00
|
|
|
# Copyright (c) 2016 RnDity Sp. z o.o.
|
2017-05-02 16:55:08 +02:00
|
|
|
# Copyright (c) 2017 BayLibre, SAS
|
2022-12-19 11:43:01 +01:00
|
|
|
# Copyright (c) 2022 Linaro Limited
|
2022-11-10 15:33:12 +01:00
|
|
|
# Copyright (c) 2023 Google Inc
|
2017-01-19 16:38:51 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-11-02 15:34:02 +01:00
|
|
|
|
2019-10-22 01:04:04 +02:00
|
|
|
config SOC_FLASH_STM32
|
2018-08-14 16:19:20 +02:00
|
|
|
bool "STM32 flash driver"
|
2023-09-11 11:46:19 +02:00
|
|
|
depends on DT_HAS_ST_STM32_FLASH_CONTROLLER_ENABLED
|
2018-03-07 14:31:56 +01:00
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2017-01-29 18:01:38 +01:00
|
|
|
default y
|
2022-12-16 17:40:25 +01:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
2019-11-04 15:49:21 +01:00
|
|
|
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
|
2023-12-19 17:07:37 +01:00
|
|
|
select USE_STM32_HAL_FLASH if BT_STM32WBA
|
|
|
|
select USE_STM32_HAL_FLASH_EX if BT_STM32WBA
|
2016-11-02 15:34:02 +01:00
|
|
|
help
|
2022-12-16 17:40:25 +01:00
|
|
|
Enable flash driver for STM32 series
|
2022-11-10 15:33:12 +01:00
|
|
|
|
|
|
|
if SOC_FLASH_STM32
|
|
|
|
|
|
|
|
config FLASH_STM32_WRITE_PROTECT
|
|
|
|
bool "Extended operation for flash write protection control"
|
|
|
|
depends on SOC_SERIES_STM32F4X
|
2023-08-10 15:23:00 +02:00
|
|
|
select FLASH_HAS_EX_OP
|
2022-11-10 15:33:12 +01:00
|
|
|
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.
|
|
|
|
|
2022-11-10 15:33:12 +01:00
|
|
|
config FLASH_STM32_READOUT_PROTECTION
|
|
|
|
bool "Extended operation for flash readout protection control"
|
2023-10-24 17:53:20 +02:00
|
|
|
depends on SOC_SERIES_STM32F4X || SOC_SERIES_STM32L4X || SOC_SERIES_STM32G4X
|
2023-08-10 15:23:00 +02:00
|
|
|
select FLASH_HAS_EX_OP
|
2022-11-10 15:33:12 +01:00
|
|
|
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.
|
|
|
|
|
2023-03-15 14:11:35 +01:00
|
|
|
config FLASH_STM32_BLOCK_REGISTERS
|
|
|
|
bool "Extended operation for blocking option and control registers"
|
2024-05-13 08:52:41 +02:00
|
|
|
select FLASH_HAS_EX_OP
|
2023-03-15 14:11:35 +01:00
|
|
|
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.
|
|
|
|
|
2023-08-02 16:57:22 +02:00
|
|
|
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.
|
|
|
|
|
2022-11-10 15:33:12 +01:00
|
|
|
endif # SOC_FLASH_STM32
|