1# Copyright (c) 2024 STMicroelectronics 2# SPDX-License-Identifier: Apache-2.0 3 4config SOC_FAMILY_STM32 5 select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE 6 select STM32_ENABLE_DEBUG_SLEEP_STOP if DEBUG || ZTEST 7 select BUILD_OUTPUT_HEX 8 9if SOC_FAMILY_STM32 10 11rsource "*/Kconfig" 12 13# STM32 wide symbols definitions 14 15# Workaround for not being able to have commas in macro arguments 16DT_CHOSEN_Z_CCM := zephyr,ccm 17 18config STM32_CCM 19 def_bool $(dt_chosen_enabled,$(DT_CHOSEN_Z_CCM)) 20 21config USE_STM32_ASSERT 22 depends on ASSERT 23 bool "STM32Cube HAL and LL drivers asserts" 24 help 25 Enable asserts in STM32Cube HAL and LL drivers. 26 27config STM32_BACKUP_SRAM 28 bool "STM32 Backup SRAM" 29 depends on DT_HAS_ST_STM32_BACKUP_SRAM_ENABLED 30 help 31 Enable support for STM32 backup SRAM. 32 33config STM32_ENABLE_DEBUG_SLEEP_STOP 34 bool "Allow debugger attach in stop/sleep Mode" 35 help 36 Some STM32 parts disable the DBGMCU in sleep/stop modes because 37 of power consumption. As a side-effects this prevents 38 debuggers from attaching w/o resetting the target. This 39 effectivly destroys the use-case of `west attach`. Also 40 SEGGER RTT and similar technologies need this. 41 42config SWJ_ANALOG_PRIORITY 43 int "SWJ DP port to analog routine initialization priority" 44 default 49 45 help 46 Initialization priority of the routine within the PRE_KERNEL1 level. 47 This priority must be greater than GPIO_INIT_PRIORITY and lower than 48 UART_INIT_PRIORITY. 49 50config STM32_FLASH_PREFETCH 51 bool "Flash prefetch buffer" 52 53config STM32_WKUP_PINS 54 bool "STM32 PWR Wake-up Pins" 55 depends on DT_HAS_ST_STM32_PWR_ENABLED 56 help 57 Enable support for STM32 PWR wake-up pins. 58 59choice POWER_SUPPLY_CHOICE 60 prompt "STM32 power supply configuration" 61 default POWER_SUPPLY_LDO 62 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX || \ 63 SOC_SERIES_STM32U5X || SOC_STM32WBA55XX 64 65config POWER_SUPPLY_LDO 66 bool "LDO supply" 67 68config POWER_SUPPLY_DIRECT_SMPS 69 bool "Direct SMPS supply" 70 71config POWER_SUPPLY_SMPS_1V8_SUPPLIES_LDO 72 bool "SMPS 1.8V supplies LDO (no external supply)" 73 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX 74 75config POWER_SUPPLY_SMPS_2V5_SUPPLIES_LDO 76 bool "SMPS 2.5V supplies LDO (no external supply)" 77 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX 78 79config POWER_SUPPLY_SMPS_1V8_SUPPLIES_EXT_AND_LDO 80 bool "External SMPS 1.8V supply, supplies LDO" 81 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX 82 83config POWER_SUPPLY_SMPS_2V5_SUPPLIES_EXT_AND_LDO 84 bool "External SMPS 2.5V supply, supplies LDO" 85 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX 86 87config POWER_SUPPLY_SMPS_1V8_SUPPLIES_EXT 88 bool "External SMPS 1.8V supply and bypass" 89 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX 90 91config POWER_SUPPLY_SMPS_2V5_SUPPLIES_EXT 92 bool "External SMPS 2.5V supply and bypass" 93 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX 94 95config POWER_SUPPLY_EXTERNAL_SOURCE 96 bool "Bypass" 97 depends on SOC_SERIES_STM32H7X || SOC_SERIES_STM32H7RSX 98 99endchoice 100 101endif # SOC_FAMILY_STM32 102