Skip to content

STM32F401: Add FLTR register to all I2C peripherals #534

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 2 commits into from
Apr 11, 2021
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
17 changes: 17 additions & 0 deletions devices/common_patches/i2c_v1_fltr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"I2C*":
_add:
# FLTR register (defined in RM0368 for example)
FLTR:
description: FLTR register
addressOffset: 0x24
access: read-write
resetValue: 0x0000
fields:
ANOFF:
description: Analog noise filter
bitOffset: 4
bitWidth: 1
DNF:
description: Digital noise filter
bitOffset: 0
bitWidth: 4
2 changes: 2 additions & 0 deletions devices/stm32f401.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ _include:
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- ../peripherals/sdio/sdio_f4.yaml
- common_patches/i2c_v1_fltr.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
2 changes: 2 additions & 0 deletions devices/stm32f410.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,5 @@ _include:
- ../peripherals/tim/tim_ccm_v1.yaml
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- common_patches/i2c_v1_fltr.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
2 changes: 2 additions & 0 deletions devices/stm32f411.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,5 @@ _include:
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- ../peripherals/sdio/sdio_f4.yaml
- common_patches/i2c_v1_fltr.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
2 changes: 2 additions & 0 deletions devices/stm32f412.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,3 +436,5 @@ _include:
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- ../peripherals/sdio/sdio_f4.yaml
- common_patches/i2c_v1_fltr.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
1 change: 1 addition & 0 deletions devices/stm32f413.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,4 @@ _include:
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- ../peripherals/sdio/sdio_f4.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
1 change: 1 addition & 0 deletions devices/stm32f427.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,4 @@ _include:
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- ../peripherals/sdio/sdio_f4.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
1 change: 1 addition & 0 deletions devices/stm32f429.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,4 @@ _include:
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- ../peripherals/sdio/sdio_f4.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
3 changes: 2 additions & 1 deletion devices/stm32f446.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,5 @@ _include:
- ../peripherals/sdio/sdio.yaml
- ../peripherals/sdio/sdio_f4_common.yaml
- ../peripherals/flash/flash_v1.yaml
- ../peripherals/rcc/rcc_v2_pllcfgr_pllr.yaml
- ../peripherals/rcc/rcc_v2_pllcfgr_pllr.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
1 change: 1 addition & 0 deletions devices/stm32f469.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@ _include:
- common_patches/rtc/rtc_cr.yaml
- ../peripherals/rtc/rtc_common.yaml
- ../peripherals/sdio/sdio_f4.yaml
- ../peripherals/i2c/i2c_v1_fltr.yaml
22 changes: 22 additions & 0 deletions peripherals/i2c/i2c_v1_fltr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"I2C*":
FLTR:
ANOFF:
Enabled: [0, "Analog noise filter enabled"]
Disabled: [1, "Analog noise filter disabled"]
DNF:
NoFilter: [0, "Digital filter disabled"]
Filter1: [1, "Digital filter enabled and filtering capability up to 1 tI2CCLK"]
Filter2: [2, "Digital filter enabled and filtering capability up to 2 tI2CCLK"]
Filter3: [3, "Digital filter enabled and filtering capability up to 3 tI2CCLK"]
Filter4: [4, "Digital filter enabled and filtering capability up to 4 tI2CCLK"]
Filter5: [5, "Digital filter enabled and filtering capability up to 5 tI2CCLK"]
Filter6: [6, "Digital filter enabled and filtering capability up to 6 tI2CCLK"]
Filter7: [7, "Digital filter enabled and filtering capability up to 7 tI2CCLK"]
Filter8: [8, "Digital filter enabled and filtering capability up to 8 tI2CCLK"]
Filter9: [9, "Digital filter enabled and filtering capability up to 9 tI2CCLK"]
Filter10: [10, "Digital filter enabled and filtering capability up to 10 tI2CCLK"]
Filter11: [11, "Digital filter enabled and filtering capability up to 11 tI2CCLK"]
Filter12: [12, "Digital filter enabled and filtering capability up to 12 tI2CCLK"]
Filter13: [13, "Digital filter enabled and filtering capability up to 13 tI2CCLK"]
Filter14: [14, "Digital filter enabled and filtering capability up to 14 tI2CCLK"]
Filter15: [15, "Digital filter enabled and filtering capability up to 15 tI2CCLK"]