diff --git a/devices/common_patches/g0_flash.yaml b/devices/common_patches/g0_flash.yaml new file mode 100644 index 000000000..5b5d6afbc --- /dev/null +++ b/devices/common_patches/g0_flash.yaml @@ -0,0 +1,15 @@ +FLASH: + _modify: + # Fix access and reset values. + WRP??R: + access: read-write + resetValue: 0x000000ff + PCROP??SR: + access: read-write + resetValue: 0xffffffff + PCROP??ER: + access: read-write + resetValue: 0x00000000 + SECR: + access: read-write + resetValue: 0x00000000 diff --git a/devices/stm32g030.yaml b/devices/stm32g030.yaml index e40563402..207184a5d 100644 --- a/devices/stm32g030.yaml +++ b/devices/stm32g030.yaml @@ -36,3 +36,4 @@ _include: - common_patches/tim/common.yaml - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim_advanced.yaml + - ./common_patches/g0_flash.yaml diff --git a/devices/stm32g031.yaml b/devices/stm32g031.yaml index f55514836..bed2de4e3 100644 --- a/devices/stm32g031.yaml +++ b/devices/stm32g031.yaml @@ -36,3 +36,4 @@ _include: - common_patches/tim/common.yaml - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim_advanced.yaml + - ./common_patches/g0_flash.yaml diff --git a/devices/stm32g041.yaml b/devices/stm32g041.yaml index 00db40e17..a8b3d006d 100644 --- a/devices/stm32g041.yaml +++ b/devices/stm32g041.yaml @@ -29,3 +29,4 @@ _include: - common_patches/tim/common.yaml - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim_advanced.yaml + - ./common_patches/g0_flash.yaml diff --git a/devices/stm32g070.yaml b/devices/stm32g070.yaml index e656ae6b4..4a529481f 100644 --- a/devices/stm32g070.yaml +++ b/devices/stm32g070.yaml @@ -168,3 +168,5 @@ _include: - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim6.yaml - ../peripherals/tim/tim_advanced.yaml + + - ./common_patches/g0_flash.yaml diff --git a/devices/stm32g071.yaml b/devices/stm32g071.yaml index ad5f61a1a..befbcdc8e 100644 --- a/devices/stm32g071.yaml +++ b/devices/stm32g071.yaml @@ -92,3 +92,4 @@ _include: - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim6.yaml - ../peripherals/tim/tim_advanced.yaml + - ./common_patches/g0_flash.yaml diff --git a/devices/stm32g081.yaml b/devices/stm32g081.yaml index 98281c3cd..5d2ff70c0 100644 --- a/devices/stm32g081.yaml +++ b/devices/stm32g081.yaml @@ -51,3 +51,4 @@ _include: - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim6.yaml - ../peripherals/tim/tim_advanced.yaml + - ./common_patches/g0_flash.yaml diff --git a/devices/stm32g0b1.yaml b/devices/stm32g0b1.yaml index 99362cbd9..e7aa85cfc 100644 --- a/devices/stm32g0b1.yaml +++ b/devices/stm32g0b1.yaml @@ -117,3 +117,4 @@ _include: - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim6.yaml - ../peripherals/tim/tim_advanced.yaml + - ./common_patches/g0_flash.yaml diff --git a/devices/stm32g0c1.yaml b/devices/stm32g0c1.yaml index 5efb148f5..ddf2204cd 100644 --- a/devices/stm32g0c1.yaml +++ b/devices/stm32g0c1.yaml @@ -125,3 +125,4 @@ _include: - ../peripherals/tim/tim_basic.yaml - ../peripherals/tim/tim6.yaml - ../peripherals/tim/tim_advanced.yaml + - ./common_patches/g0_flash.yaml