Skip to content

Py32f040 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@

All notable changes to this project will be documented in this file.

## v0.2.0
## v0.2.1 2025-01-28

### Added

- Added array access to timer CCR registers
- Added py32f040 device
- `scripts/README.md` to show usage of scripts
- modified scripts to handle `bitRange` vs `bitOffset` and `bitWidth` usage in svd files

### Changed

- Renamed field `DBG_TIM14_STOP` to `DBG_TIMER14_STOP` in `DBG` peripheral for py32f002b to make it consistent with other devices

### Removed

- Removed renaming of timer CCR registers

## v0.2.0 2024-12-28

### Added

Expand All @@ -17,11 +34,11 @@ All notable changes to this project will be documented in this file.
- Updated form version from 0.10.0 to 0.12.1
- Updated svdtools version from 0.3.0 to 0.3.14

## v0.1.1
## v0.1.1 2024-10-10

## V0.1.0
## V0.1.0 2024-09-27

## v0.0.1
## v0.0.1 2023-06-10

- Original Release

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ make any guarantee of correctness. Please report any bugs you find!
In your own project's `Cargo.toml`:
```toml
[dependencies.py32f0]
version = "0.1.1"
version = "0.2.1"
features = ["py32f030"]
```

Expand Down
4 changes: 4 additions & 0 deletions devices/common_patches/adc_rw.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SR:
_modify:
OVER:
access: read-write
4 changes: 4 additions & 0 deletions devices/common_patches/f002b_dbg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
APB_FZ2:
_modify:
DBG_TIM14_STOP:
name: DBG_TIMER14_STOP
4 changes: 4 additions & 0 deletions devices/common_patches/flash_f040_rename.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
OPTR:
_modify:
NBOOT1:
name: nBOOT1
35 changes: 35 additions & 0 deletions devices/common_patches/rtc_040_renames.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
PRLH:
_modify:
PRL:
name: PRLH
PRLL:
_modify:
PRL:
name: PRLL
DIVH:
_modify:
DIV:
name: DIVH
DIVL:
_modify:
DIV:
name: DIVL
CNTH:
_modify:
RTC_CNT:
name: CNTH
CNTL:
_modify:
RTC_CNT:
name: CNTL
ALRH:
_modify:
RTC_ALR:
name: ALRH
ALRL:
_modify:
RTC_ALR:
name: ALRL
_modify:
BKP_RTCCR:
name: RTCCR
2 changes: 2 additions & 0 deletions devices/common_patches/timer_ccr_reg_array.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_array:
CCR*: {}
10 changes: 10 additions & 0 deletions devices/common_patches/usart_f040_rename.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
BRR:
_modify:
DIV_FRACTION:
name: DIV_Fraction
DIV_MANTISSA:
name: DIV_Mantissa
CR3:
_modify:
ABRMODE:
name: ABRMOD
4 changes: 4 additions & 0 deletions devices/py32f002a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ _svd: ../svd/py32f002a.svd
_include:
- common_patches/usart_dr8.yaml

TIM1:
_include:
- common_patches/timer_ccr_reg_array.yaml

_include:
- ./common_patches/pwr_f002a.yaml
- ./common_patches/syscfg_f002a.yaml
Expand Down
8 changes: 8 additions & 0 deletions devices/py32f002b.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ _svd: ../svd/py32f002b.svd
_include:
- common_patches/usart_dr8.yaml

"DBG":
_include:
- common_patches/f002b_dbg.yaml

"TIM*":
_include:
- common_patches/timer_ccr_reg_array.yaml

_include:
- ./common_patches/syscfg_f002b.yaml
- ../peripherals/flash/flash_f002b.yaml
Expand Down
4 changes: 4 additions & 0 deletions devices/py32f003.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ _svd: ../svd/py32f003.svd
_include:
- common_patches/dma_cluster.yaml

"TIM*":
_include:
- common_patches/timer_ccr_reg_array.yaml

_include:
- ../peripherals/flash/flash_f0.yaml
- ../peripherals/pwr/pwr_f0.yaml
Expand Down
4 changes: 4 additions & 0 deletions devices/py32f030.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ _svd: ../svd/py32f030.svd
_include:
- common_patches/dma_cluster.yaml

"TIM*":
_include:
- common_patches/timer_ccr_reg_array.yaml

_include:
- ../peripherals/flash/flash_f0.yaml
- ../peripherals/pwr/pwr_f0.yaml
Expand Down
48 changes: 48 additions & 0 deletions devices/py32f040.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
_svd: ../svd/py32f040.svd

"SPI*":
_include:
- common_patches/spi_dr8.yaml

"USART*":
_include:
- common_patches/usart_dr8.yaml
- common_patches/usart_f040_rename.yaml

"DMA, DMA[12]":
_include:
- common_patches/dma_cluster.yaml

"FLASH":
_include:
- common_patches/flash_f040_rename.yaml

"ADC":
_include:
- common_patches/adc_rw.yaml

"RTC":
_include:
- common_patches/rtc_040_renames.yaml

_include:
- ../peripherals/flash/flash_f040.yaml
- ../peripherals/pwr/pwr_f040.yaml
- ../peripherals/rcc/rcc_f040.yaml
- ../peripherals/gpio/gpio_f0.yaml
- ../peripherals/syscfg/syscfg_f040.yaml
- ../peripherals/dma/dma_f0.yaml
- ../peripherals/exti/exti_f0.yaml
- ../peripherals/crc/crc_f0.yaml
- ../peripherals/adc/adc_f040.yaml
- ../peripherals/comp/comp_f040.yaml
- ../peripherals/lcd/lcd_f0.yaml
- ../peripherals/tim/tim_f040.yaml
- ../peripherals/lptim/lptim_f0.yaml
- ../peripherals/iwdg/iwdg_f0.yaml
- ../peripherals/wwdg/wwdg_f0.yaml
- ../peripherals/rtc/rtc_f0.yaml
- ../peripherals/i2c/i2c_f040.yaml
- ../peripherals/usart/usart_f0.yaml
- ../peripherals/spi/spi_f040.yaml
- ../peripherals/dbg/dbg_f0.yaml
Loading