From 21be7a6a9c72308fd102b9dfa322b895737161f2 Mon Sep 17 00:00:00 2001 From: Andrey Zgarbul Date: Sat, 13 Sep 2025 08:07:06 +0300 Subject: [PATCH] wb5x --- README.md | 2 + devices/stm32wb10.yaml | 78 +++++++++++++++++++++++++++ devices/stm32wb15.yaml | 86 +++++++++++++++++++++++++++++ devices/stm32wb30.yaml | 81 ++++++++++++++++++++++++++++ devices/stm32wb35.yaml | 99 ++++++++++++++++++++++++++++++++++ devices/stm32wb50.yaml | 120 +++++++++++++++++++++++++++++++++++++++++ scripts/makecrates.py | 2 +- stm32_part_table.yaml | 29 ++++++++-- svd/extract.ds | 5 ++ svd/extract.sh | 5 ++ 10 files changed, 503 insertions(+), 4 deletions(-) create mode 100644 devices/stm32wb10.yaml create mode 100644 devices/stm32wb15.yaml create mode 100644 devices/stm32wb30.yaml create mode 100644 devices/stm32wb35.yaml create mode 100644 devices/stm32wb50.yaml diff --git a/README.md b/README.md index 6c7c94020..434fbf61d 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ [![crates.io](https://img.shields.io/crates/v/stm32n6.svg?label=stm32n6)](https://crates.io/crates/stm32n6) [![crates.io](https://img.shields.io/crates/v/stm32u0.svg?label=stm32u0)](https://crates.io/crates/stm32u0) [![crates.io](https://img.shields.io/crates/v/stm32u5.svg?label=stm32u5)](https://crates.io/crates/stm32u5) +[![crates.io](https://img.shields.io/crates/v/stm32wb0.svg?label=stm32wb0)](https://crates.io/crates/stm32wb0) [![crates.io](https://img.shields.io/crates/v/stm32wb.svg?label=stm32wb)](https://crates.io/crates/stm32wb) +[![crates.io](https://img.shields.io/crates/v/stm32wba.svg?label=stm32wba)](https://crates.io/crates/stm32wba) [![crates.io](https://img.shields.io/crates/v/stm32wl.svg?label=stm32wl)](https://crates.io/crates/stm32wl) [![Matrix](https://img.shields.io/matrix/stm32-rs:matrix.org)](https://matrix.to/#/#stm32-rs:matrix.org) diff --git a/devices/stm32wb10.yaml b/devices/stm32wb10.yaml new file mode 100644 index 000000000..0564044c4 --- /dev/null +++ b/devices/stm32wb10.yaml @@ -0,0 +1,78 @@ +_svd: ../svd/stm32wb10.svd + +_modify: + name: STM32WB10 + HSEM: + groupName: HSEM + +ADC: {} + +CRC: {} + +DBGMCU: {} + +DMA1: {} + +DMAMUX: {} + +EXTI: {} + +Flash: {} + +GPIO[ABCEH]: + _include: + - fields/gpio/v2/common.yaml + +GPIO[A-E]: #H + _include: collect/gpio/v2.yaml +GPIO[A]: + _include: collect/gpio/gpioa_afr.yaml +GPIO[BCE]: + _include: collect/gpio/v2_derive.yaml + +HSEM: {} + +I2C1: {} + +IPCC: {} + +IWDG: {} + +LPTIM1: {} + +PKA: {} + +PWR: {} + +RCC: {} + +RNG: {} + +RTC: {} + +SPI1: {} + +SYSCFG: {} + +TIM1: {} + +TIM2: {} + +TSC: + _include: + - fields/tsc/tsc.yaml + - collect/tsc/iogcr.yaml + +USART1: + _include: + - patches/usart/merge_CR1_DEDTx_fields.yaml + - patches/usart/merge_CR1_DEATx_fields.yaml + - patches/usart/merge_CR2_ABRMODx_fields.yaml + - patches/usart/merge_CR2_ADDx_fields.yaml + - patches/usart/rename_CR2_DATAINV_field.yaml + - fields/usart/v4/B.yaml + +WWDG: + _include: + - patches/16bit.yaml + - fields/wwdg/wwdg_v2.yaml diff --git a/devices/stm32wb15.yaml b/devices/stm32wb15.yaml new file mode 100644 index 000000000..55a5ef254 --- /dev/null +++ b/devices/stm32wb15.yaml @@ -0,0 +1,86 @@ +_svd: ../svd/stm32wb15.svd + +_modify: + name: STM32WB15 + AES?: + groupName: AES + HSEM: + groupName: HSEM + +ADC: {} + +AES2: {} + +COMP: {} + +CRC: {} + +DBGMCU: {} + +DMA1: {} + +DMAMUX: {} + +EXTI: {} + +Flash: {} + +GPIO[ABCEH]: + _include: + - fields/gpio/v2/common.yaml + +GPIO[A-E]: #H + _include: collect/gpio/v2.yaml +GPIO[A]: + _include: collect/gpio/gpioa_afr.yaml +GPIO[BCE]: + _include: collect/gpio/v2_derive.yaml + +HSEM: {} + +I2C1: {} + +IPCC: {} + +IWDG: {} + +LPTIM1: {} + +LPUART1: {} + +PKA: {} + +PWR: {} + +RCC: {} + +RNG: {} + +RTC: {} + +SPI1: {} + +SYSCFG: {} + +TIM1: {} + +TIM2: {} + +TSC: + _include: + - fields/tsc/tsc.yaml + - collect/tsc/iogcr.yaml + +USART1: + _include: + - patches/usart/merge_CR1_DEDTx_fields.yaml + - patches/usart/merge_CR1_DEATx_fields.yaml + - patches/usart/merge_CR2_ABRMODx_fields.yaml + - patches/usart/merge_CR2_ADDx_fields.yaml + - patches/usart/rename_CR2_DATAINV_field.yaml + - fields/usart/v4/B.yaml + +WWDG: + _include: + - patches/16bit.yaml + - fields/wwdg/wwdg_v2.yaml diff --git a/devices/stm32wb30.yaml b/devices/stm32wb30.yaml new file mode 100644 index 000000000..8931633d1 --- /dev/null +++ b/devices/stm32wb30.yaml @@ -0,0 +1,81 @@ +_svd: ../svd/stm32wb30.svd + +_modify: + name: STM32WB30 + AES?: + groupName: AES + HSEM: + groupName: HSEM + +ADC: {} + +AES2: {} + +CRC: {} + +DBGMCU: {} + +DMA1: {} + +DMAMUX: {} + +EXTI: {} + +Flash: {} + +GPIO[ABCEH]: + _include: + - fields/gpio/v2/common.yaml + +GPIO[A-E]: #H + _include: collect/gpio/v2.yaml +GPIO[A]: + _include: collect/gpio/gpioa_afr.yaml +GPIO[BCE]: + _include: collect/gpio/v2_derive.yaml + +HSEM: {} + +I2C1: {} + +IPCC: {} + +IWDG: {} + +LPTIM1: {} + +PKA: {} + +PWR: {} + +RCC: {} + +RNG: {} + +RTC: {} + +SPI1: {} + +SYSCFG: {} + +TIM1: {} + +TIM2: {} + +TIM16: {} + +TIM17: {} + +USART1: + _include: + - patches/usart/merge_CR1_DEDTx_fields.yaml + - patches/usart/merge_CR1_DEATx_fields.yaml + - patches/usart/merge_CR2_ABRMODx_fields.yaml + - patches/usart/merge_CR2_ADDx_fields.yaml + - patches/usart/rename_CR2_DATAINV_field.yaml + - fields/usart/v4/B.yaml + +WWDG: + _include: + - patches/16bit.yaml + - fields/wwdg/wwdg_v2.yaml diff --git a/devices/stm32wb35.yaml b/devices/stm32wb35.yaml new file mode 100644 index 000000000..85b1f12fb --- /dev/null +++ b/devices/stm32wb35.yaml @@ -0,0 +1,99 @@ +_svd: ../svd/stm32wb35.svd + +_modify: + name: STM32WB35 + AES?: + groupName: AES + HSEM: + groupName: HSEM + +_derive: + DMA2: DMA1 + +DMA1: {} + +DMAMUX: {} + +CRC: {} + +IWDG: {} + +COMP: {} + +I2C1: {} + +Flash: {} + +QUADSPI: {} + +RCC: {} + +PWR: {} + +SYSCFG: {} + +RNG: {} + +AES1: {} + +AES2: {} + +HSEM: {} + +ADC: {} + +GPIO[ABCEH]: + _include: + - fields/gpio/v2/common.yaml + +GPIO[A-E]: #H + _include: collect/gpio/v2.yaml +GPIO[A]: + _include: collect/gpio/gpioa_afr.yaml +GPIO[BCE]: + _include: collect/gpio/v2_derive.yaml + +TIM2: {} + +TIM16: {} + +TIM17: {} + +TIM1: {} + +LPTIM1: {} + +SAI1: {} + +SPI1: {} + +RTC: {} + +DBGMCU: {} + +PKA: {} + +IPCC: {} + +EXTI: {} + +CRS: {} + +USART1: + _include: + - patches/usart/merge_CR1_DEDTx_fields.yaml + - patches/usart/merge_CR1_DEATx_fields.yaml + - patches/usart/merge_CR2_ABRMODx_fields.yaml + - patches/usart/merge_CR2_ADDx_fields.yaml + - patches/usart/rename_CR2_DATAINV_field.yaml + - fields/usart/v4/B.yaml + +USB: + _include: + - fields/usb/v2_with_LPM.yaml + - collect/usb/epxr.yaml + +WWDG: + _include: + - patches/16bit.yaml + - fields/wwdg/wwdg_v2.yaml diff --git a/devices/stm32wb50.yaml b/devices/stm32wb50.yaml new file mode 100644 index 000000000..f264ee700 --- /dev/null +++ b/devices/stm32wb50.yaml @@ -0,0 +1,120 @@ +_svd: ../svd/stm32wb50.svd + +_modify: + name: STM32WB50 + AES?: + groupName: AES + HSEM: + groupName: HSEM + +_derive: + DMA2: DMA1 + +ADC: {} + +AES2: {} + +CRC: {} + +DBGMCU: {} + +DMA1: {} + +DMAMUX: {} + +EXTI: {} + +Flash: {} + +GPIO[ABCEH]: + _include: + - fields/gpio/v2/common.yaml + +GPIO[A-E]: #H + _include: collect/gpio/v2.yaml +GPIO[A]: + _include: collect/gpio/gpioa_afr.yaml +GPIO[BCE]: + _include: collect/gpio/v2_derive.yaml + +HSEM: {} + +I2C1: {} + +IPCC: {} + +IWDG: {} + +LPTIM1: {} + +PKA: {} + +PWR: {} + +RCC: {} + +RNG: {} + +RTC: {} + +SPI1: {} + +SYSCFG: {} + +TIM1: + CCMR1_Input: + _modify: + C1F: + name: IC1F + _include: + - patches/tim/v2/oc5m_bit3.yaml + - patches/tim/dmab_32.yaml + - fields/tim/v2/tim1.yaml + - collect/tim/ccr.yaml + +TIM2: + _include: + - patches/tim/tim2_common_32bit.yaml + - fields/tim/basic.yaml + - fields/tim/tim_32bit.yaml + - fields/tim/tim_gp1.yaml + - fields/tim/tim_ckd.yaml + - fields/tim/ccr.yaml + - fields/tim/v2/ccm_extended.yaml + - collect/tim/ccr.yaml + CNT: + _add: + UIFREMAP_CNT: + description: Counter value when CR1.UIFREMAP=1 + bitOffset: 0 + bitWidth: 31 + _modify: + UIFCPY: + description: Copy of ISR.UIF when CR1.UIFREMAP=1 + CNT_H: + bitWidth: 16 + bitOffset: 16 + CNT_L: + bitOffset: 0 + +TIM1[67]: + _include: + - fields/tim/v2/tim16.yaml + - collect/tim/ccr.yaml + +TIM17: + _include: collect/tim/tim17_derive.yaml + +USART1: + _include: + - patches/usart/merge_CR1_DEDTx_fields.yaml + - patches/usart/merge_CR1_DEATx_fields.yaml + - patches/usart/merge_CR2_ABRMODx_fields.yaml + - patches/usart/merge_CR2_ADDx_fields.yaml + - patches/usart/rename_CR2_DATAINV_field.yaml + - fields/usart/v4/B.yaml + +WWDG: + _include: + - patches/16bit.yaml + - fields/wwdg/wwdg_v2.yaml diff --git a/scripts/makecrates.py b/scripts/makecrates.py index 46ba59ac3..ab3399378 100644 --- a/scripts/makecrates.py +++ b/scripts/makecrates.py @@ -43,7 +43,7 @@ "stm32u0": ["stm32u031", "stm32u083"], "stm32u5": ["stm32u535", "stm32u545", "stm32u575", "stm32u585", "stm32u595", "stm32u5a5", "stm32u599", "stm32u5a9"], "stm32wl": ["stm32wle5", "stm32wl5x_cm4"], - "stm32wb": ["stm32wb55"], + "stm32wb": ["stm32wb50", "stm32wb55"], "stm32wb0": ["stm32wb05", "stm32wb07", "stm32wb09"], "stm32wba": ["stm32wba50", "stm32wba52", "stm32wba54", "stm32wba55"] } diff --git a/stm32_part_table.yaml b/stm32_part_table.yaml index b716499d9..ed1f2d79e 100644 --- a/stm32_part_table.yaml +++ b/stm32_part_table.yaml @@ -828,12 +828,35 @@ stm32wl: - STM32WL5X (CM0+) stm32wb: - stm32wb55: + stm32wb10: + url: https://www.st.com/en/microcontrollers-microprocessors/stm32wbx0-value-line.html + rm: RM0478 + rm_title: STM32WB10 + rm_url: https://www.st.com/resource/en/reference_manual/rm0478-multiprotocol-wireless-32bit-mcu-armbased-cortexm4-with-fpu-bluetooth-low-energy-54-radio-solution-stmicroelectronics.pdf + members: + - STM32WB10 + stm32wb15: + url: https://www.st.com/en/microcontrollers-microprocessors/stm32wbx5.html + rm: RM0473 + rm_title: STM32WB15 + rm_url: https://www.st.com/resource/en/reference_manual/rm0473-multiprotocol-wireless-32bit-mcu-armbased-cortexm4-with-fpu-bluetooth-low-energy-radio-solution-stmicroelectronics.pdf + members: + - STM32WB15 + stm32wb30-50: + url: https://www.st.com/en/microcontrollers-microprocessors/stm32wbx0-value-line.html + rm: RM0471 + rm_title: STM32WB30 and STM32WB50 + rm_url: https://www.st.com/resource/en/reference_manual/rm0471-multiprotocol-wireless-32bit-mcu-armbased-cortexm4-with-fpu-bluetooth-low-energy-or-802154-radio-solution-stmicroelectronics.pdf + members: + - STM32WB30 + - STM32WB50 + stm32wb35-55: url: https://www.st.com/en/microcontrollers-microprocessors/stm32wbx5.html rm: RM0434 - rm_title: STM32WBx5 - rm_url: https://www.st.com/resource/en/reference_manual/dm00318631-multiprotocol-wireless-32bit-mcu-armbased-cortexm4-with-fpu-bluetooth-lowenergy-and-802154-radio-solution-stmicroelectronics.pdf + rm_title: STM32WB35 and STM32WB55 + rm_url: https://www.st.com/resource/en/reference_manual/rm0434-multiprotocol-wireless-32bit-mcu-armbased-cortexm4-with-fpu-bluetooth-lowenergy-and-802154-radio-solution-stmicroelectronics.pdf members: + - STM32WB35 - STM32WB55 stm32wb0: diff --git a/svd/extract.ds b/svd/extract.ds index ef577aeb4..dc8f64308 100644 --- a/svd/extract.ds +++ b/svd/extract.ds @@ -36,6 +36,11 @@ mv stm32mp153x.svd stm32mp153.svd # Rename WLE5 file to remove _cm4, since it only has one core. mv stm32wle5_cm4.svd stm32wle5.svd +mv stm32wb10_cm4.svd stm32wb10.svd +mv stm32wb15_cm4.svd stm32wb15.svd +mv stm32wb30_cm4.svd stm32wb30.svd +mv stm32wb35_cm4.svd stm32wb35.svd +mv stm32wb50_cm4.svd stm32wb50.svd mv stm32wb55_cm4.svd stm32wb55.svd touch .extracted diff --git a/svd/extract.sh b/svd/extract.sh index bea9a216e..c4e9f34fc 100755 --- a/svd/extract.sh +++ b/svd/extract.sh @@ -24,4 +24,9 @@ mv stm32mp153x.svd stm32mp153.svd # Rename WLE5 file to remove _cm4, since it only has one core. mv stm32wle5_cm4.svd stm32wle5.svd +mv stm32wb10_cm4.svd stm32wb10.svd +mv stm32wb15_cm4.svd stm32wb15.svd +mv stm32wb30_cm4.svd stm32wb30.svd +mv stm32wb35_cm4.svd stm32wb35.svd +mv stm32wb50_cm4.svd stm32wb50.svd mv stm32wb55_cm4.svd stm32wb55.svd