From 9cf4f6c08594fbd777ae484941c653b586a0f914 Mon Sep 17 00:00:00 2001 From: David Goodlad Date: Thu, 16 Dec 2021 10:01:30 +1100 Subject: [PATCH 1/2] Add enumerated values for STM32F415 TIM2 ITR1_RMP These values are from STMicro RM0090 --- devices/stm32f405.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devices/stm32f405.yaml b/devices/stm32f405.yaml index fc6a48d27..ff1d183c4 100644 --- a/devices/stm32f405.yaml +++ b/devices/stm32f405.yaml @@ -28,6 +28,15 @@ _modify: bitWidth: 1 access: read-write +TIM2: + OR: + ITR1_RMP: + _replace_enum: + TIM8_TRGOUT: [0, "TIM8 trigger output is connected to TIM2_ITR1 input"] + PTP_TRGOUT: [1, "PTP trigger output is connected to TIM2_ITR1 input"] + OTG_FS_SOF: [2, "OTG FS SOF is connected to the TIM2_ITR1 input"] + OTG_HS_SOF: [3, "OTG HS SOF is connected to the TIM2_ITR1 input"] + CRC: # The SVD calls the RESET field "CR", fix per RM0090 CR: From 3a7e8e4ec2436c01c802c875242c44c72942ba7d Mon Sep 17 00:00:00 2001 From: David Goodlad Date: Thu, 16 Dec 2021 10:56:17 +1100 Subject: [PATCH 2/2] TIM2 ITR1_RMP for all devices covered by RM0090 STM32F405/415; STM32F407/417; STM32F427/437; STM32F429/439 --- devices/common_patches/tim/tim2_itr1_rmp.yaml | 13 +++++++++++++ devices/stm32f405.yaml | 10 +--------- devices/stm32f407.yaml | 1 + devices/stm32f427.yaml | 1 + devices/stm32f429.yaml | 1 + 5 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 devices/common_patches/tim/tim2_itr1_rmp.yaml diff --git a/devices/common_patches/tim/tim2_itr1_rmp.yaml b/devices/common_patches/tim/tim2_itr1_rmp.yaml new file mode 100644 index 000000000..2dbc59e65 --- /dev/null +++ b/devices/common_patches/tim/tim2_itr1_rmp.yaml @@ -0,0 +1,13 @@ +# TIM2 peripheral on STM32F405/415, STM32F407/F417, STM32F427/437, STM32F429/439 +# can remap ITR1 to internal trigger signals +# +# + +TIM2: + OR: + ITR1_RMP: + _replace_enum: + TIM8_TRGOUT: [0, "TIM8 trigger output is connected to TIM2_ITR1 input"] + PTP: [1, "Ethernet PTP clock is connected to TIM2_ITR1 input"] + OTG_FS_SOF: [2, "OTG FS SOF is connected to the TIM2_ITR1 input"] + OTG_HS_SOF: [3, "OTG HS SOF is connected to the TIM2_ITR1 input"] diff --git a/devices/stm32f405.yaml b/devices/stm32f405.yaml index ff1d183c4..f88007273 100644 --- a/devices/stm32f405.yaml +++ b/devices/stm32f405.yaml @@ -28,15 +28,6 @@ _modify: bitWidth: 1 access: read-write -TIM2: - OR: - ITR1_RMP: - _replace_enum: - TIM8_TRGOUT: [0, "TIM8 trigger output is connected to TIM2_ITR1 input"] - PTP_TRGOUT: [1, "PTP trigger output is connected to TIM2_ITR1 input"] - OTG_FS_SOF: [2, "OTG FS SOF is connected to the TIM2_ITR1 input"] - OTG_HS_SOF: [3, "OTG HS SOF is connected to the TIM2_ITR1 input"] - CRC: # The SVD calls the RESET field "CR", fix per RM0090 CR: @@ -116,6 +107,7 @@ _include: - ../peripherals/tim/tim_advanced.yaml - common_patches/tim/tim_ccr.yaml - ../peripherals/tim/v1/ccm.yaml + - common_patches/tim/tim2_itr1_rmp.yaml - ../peripherals/usart/uart_common.yaml - ../peripherals/usart/uart_sample.yaml - ../peripherals/usart/uart_uart.yaml diff --git a/devices/stm32f407.yaml b/devices/stm32f407.yaml index 824ab7ac4..bce803bd6 100644 --- a/devices/stm32f407.yaml +++ b/devices/stm32f407.yaml @@ -107,6 +107,7 @@ _include: - ../peripherals/tim/tim_advanced.yaml - common_patches/tim/tim_ccr.yaml - ../peripherals/tim/v1/ccm.yaml + - common_patches/tim/tim2_itr1_rmp.yaml - ../peripherals/eth/eth_dma_common.yaml - ../peripherals/eth/eth_dma_mb_edfe_dmarswtr.yaml - ../peripherals/eth/eth_mac_common.yaml diff --git a/devices/stm32f427.yaml b/devices/stm32f427.yaml index 4da5530d6..94075fb31 100644 --- a/devices/stm32f427.yaml +++ b/devices/stm32f427.yaml @@ -234,6 +234,7 @@ _include: - ../peripherals/tim/tim_advanced.yaml - common_patches/tim/tim_ccr.yaml - ../peripherals/tim/v1/ccm.yaml + - common_patches/tim/tim2_itr1_rmp.yaml - ../peripherals/iwdg/iwdg.yaml - ../peripherals/exti/exti.yaml - common_patches/hash/hash.yaml diff --git a/devices/stm32f429.yaml b/devices/stm32f429.yaml index d50749d36..74080bdef 100644 --- a/devices/stm32f429.yaml +++ b/devices/stm32f429.yaml @@ -173,6 +173,7 @@ _include: - ../peripherals/tim/tim_advanced.yaml - common_patches/tim/tim_ccr.yaml - ../peripherals/tim/v1/ccm.yaml + - common_patches/tim/tim2_itr1_rmp.yaml - ../peripherals/eth/eth_dma_common.yaml - ../peripherals/eth/eth_dma_mb_edfe_dmarswtr.yaml - ../peripherals/eth/eth_mac_common.yaml