2020-05-03 14:35:01 +02:00
|
|
|
include $(RIOTCPU)/stm32/stm32_info.mk
|
|
|
|
|
2020-08-03 00:31:59 +02:00
|
|
|
ifneq (mp1,$(CPU_FAM))
|
|
|
|
FEATURES_PROVIDED += bootloader_stm32
|
2020-11-05 01:06:10 +01:00
|
|
|
FEATURES_PROVIDED += periph_wdt
|
2020-08-03 00:31:59 +02:00
|
|
|
endif
|
2020-05-30 18:59:01 +02:00
|
|
|
FEATURES_PROVIDED += cpu_stm32$(CPU_FAM)
|
2020-05-03 14:35:01 +02:00
|
|
|
FEATURES_PROVIDED += periph_cpuid
|
|
|
|
FEATURES_PROVIDED += periph_gpio periph_gpio_irq
|
2020-06-29 22:15:48 +02:00
|
|
|
FEATURES_PROVIDED += periph_timer_periodic
|
2021-01-13 20:48:29 +01:00
|
|
|
FEATURES_PROVIDED += periph_rtt_overflow
|
2020-05-03 14:35:01 +02:00
|
|
|
FEATURES_PROVIDED += periph_uart_modecfg
|
2020-06-10 15:44:58 +02:00
|
|
|
FEATURES_PROVIDED += periph_uart_nonblocking
|
2023-03-17 14:34:44 +01:00
|
|
|
FEATURES_PROVIDED += periph_gpio_ll
|
2023-03-20 14:07:14 +01:00
|
|
|
FEATURES_PROVIDED += periph_gpio_ll_irq
|
|
|
|
FEATURES_PROVIDED += periph_gpio_ll_irq_level_triggered_high
|
|
|
|
FEATURES_PROVIDED += periph_gpio_ll_irq_level_triggered_low
|
2021-08-27 22:59:43 +02:00
|
|
|
|
2021-12-15 15:53:53 +01:00
|
|
|
ifneq (,$(filter $(CPU_FAM),f0 f1 f3 g0 g4 l0 l1 l4 l5 u5 wb wl))
|
2020-07-15 11:51:44 +02:00
|
|
|
FEATURES_PROVIDED += periph_flashpage
|
2022-03-17 19:45:54 +01:00
|
|
|
FEATURES_PROVIDED += periph_flashpage_in_address_space
|
2020-11-09 16:45:22 +01:00
|
|
|
FEATURES_PROVIDED += periph_flashpage_pagewise
|
2020-05-03 14:35:01 +02:00
|
|
|
endif
|
|
|
|
|
2021-12-15 15:53:53 +01:00
|
|
|
ifneq (,$(filter $(CPU_FAM),f0 f2 f3 f4 f7 l0 l1 l4 l5 u5 wb wl))
|
2021-09-03 11:15:17 +02:00
|
|
|
CPU_MODELS_WITHOUT_RTC_BKPR += stm32f030% stm32f070%
|
|
|
|
ifeq (,$(filter $(CPU_MODELS_WITHOUT_RTC_BKPR),$(CPU_MODEL)))
|
|
|
|
FEATURES_PROVIDED += periph_rtc_mem
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2021-09-16 09:58:37 +02:00
|
|
|
STM32_WITH_BKPRAM = stm32f205% stm32f207% stm32f215% stm32f217% \
|
|
|
|
stm32f405% stm32f407% stm32f415% stm32f417% \
|
|
|
|
stm32f427% stm32f429% stm32f437% stm32f439% \
|
|
|
|
stm32f446% stm32f469% stm32f479% \
|
|
|
|
stm32f7% \
|
|
|
|
stm32u5%
|
|
|
|
ifneq (,$(filter $(STM32_WITH_BKPRAM),$(CPU_MODEL)))
|
|
|
|
FEATURES_PROVIDED += backup_ram
|
|
|
|
endif
|
|
|
|
|
2021-10-12 13:16:57 +02:00
|
|
|
STM32_WITH_VBAT = stm32f031% stm32f038% stm32f042% stm32f048% \
|
|
|
|
stm32f051% stm32f058% stm32f071% stm32f072% \
|
|
|
|
stm32f078% stm32f091% stm32f098% \
|
|
|
|
stm32f2% \
|
|
|
|
stm32f3% \
|
|
|
|
stm32f4% \
|
|
|
|
stm32f7% \
|
|
|
|
stm32g0% \
|
|
|
|
stm32g4% stm32gbk1cb \
|
|
|
|
stm32l4% \
|
|
|
|
stm32l5% \
|
|
|
|
stm32u5% \
|
|
|
|
stm32wb% \
|
|
|
|
stm32wl%
|
|
|
|
|
|
|
|
ifneq (,$(filter $(STM32_WITH_VBAT),$(CPU_MODEL)))
|
|
|
|
FEATURES_PROVIDED += periph_vbat
|
|
|
|
endif
|
|
|
|
|
2020-11-10 15:07:35 +01:00
|
|
|
# The f2, f4 and f7 do not support the pagewise api
|
|
|
|
ifneq (,$(filter $(CPU_FAM),f2 f4 f7))
|
|
|
|
FEATURES_PROVIDED += periph_flashpage
|
|
|
|
endif
|
|
|
|
|
2020-05-26 11:12:06 +02:00
|
|
|
ifneq (,$(filter $(CPU_FAM),l0 l1))
|
2020-05-03 14:35:01 +02:00
|
|
|
FEATURES_PROVIDED += periph_eeprom
|
|
|
|
endif
|
|
|
|
|
2020-05-30 18:59:36 +02:00
|
|
|
ifeq (f1,$(CPU_FAM))
|
2020-05-03 14:35:01 +02:00
|
|
|
FEATURES_CONFLICT += periph_rtc:periph_rtt
|
|
|
|
FEATURES_CONFLICT_MSG += "On the STM32F1, the RTC and RTT map to the same hardware peripheral."
|
2021-03-03 17:05:35 +01:00
|
|
|
FEATURES_PROVIDED += periph_rtt_set_counter
|
2020-05-03 14:35:01 +02:00
|
|
|
endif
|
|
|
|
|
2020-05-29 17:37:05 +02:00
|
|
|
# Not all F4 and L0 parts implement a RNG.
|
2020-10-13 15:30:07 +02:00
|
|
|
CPU_MODELS_WITHOUT_HWRNG = stm32f401% stm32f411% stm32f446% stm32l031% stm32l011%
|
2021-12-15 15:53:53 +01:00
|
|
|
ifneq (,$(filter $(CPU_FAM),f2 f4 f7 g4 l0 l4 l5 u5 wb))
|
2020-05-29 17:37:05 +02:00
|
|
|
ifeq (,$(filter $(CPU_MODELS_WITHOUT_HWRNG),$(CPU_MODEL)))
|
|
|
|
FEATURES_PROVIDED += periph_hwrng
|
|
|
|
endif
|
2020-05-03 14:35:01 +02:00
|
|
|
endif
|
|
|
|
|
2020-08-03 00:25:58 +02:00
|
|
|
ifneq (,$(filter $(CPU_FAM),f2 f4 f7 g4 l1 l4 mp1))
|
2020-05-03 14:35:01 +02:00
|
|
|
FEATURES_PROVIDED += cortexm_mpu
|
|
|
|
endif
|
|
|
|
|
2020-08-21 15:19:49 +02:00
|
|
|
# only some stm32f3 have an MPU, stm32l052t8 provides an MPU but support is
|
|
|
|
# broken for cortex-m0+
|
|
|
|
STM32_WITH_MPU += stm32f303re stm32f303vc stm32f303ze
|
2020-05-03 14:35:01 +02:00
|
|
|
ifneq (,$(filter $(CPU_MODEL),$(STM32_WITH_MPU)))
|
|
|
|
FEATURES_PROVIDED += cortexm_mpu
|
|
|
|
endif
|
|
|
|
|
2021-12-10 16:04:46 +01:00
|
|
|
include $(RIOTCPU)/cortexm_common/Makefile.features
|
|
|
|
|
|
|
|
# Add stm32 configs after including cortexm_common so stm32 takes precedence
|
2021-05-19 17:41:00 +02:00
|
|
|
# This configuration enables modules that are only available when using Kconfig
|
|
|
|
# module modelling
|
|
|
|
ifeq (1, $(TEST_KCONFIG))
|
2021-12-10 16:04:46 +01:00
|
|
|
KCONFIG_CPU_CONFIG += $(RIOTCPU)/stm32/stm32.config
|
2021-05-19 17:41:00 +02:00
|
|
|
endif
|