Skip to content

Commit ee4ccad

Browse files
committed
H7 flash: Add registers that are mirrored between banks for rm0399
See RM0399 Rev 3 Table 19. These mirrored registers are present on other H7 parts Including these registers changes the svd2rust access for bank2, from a public member to a method that returns a reference. This makes it consistent with other H7 parts
1 parent 4f9b182 commit ee4ccad

File tree

2 files changed

+257
-0
lines changed

2 files changed

+257
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Family-specific:
1313

1414
* H7:
1515
* h7b3: clear all enumeratedValues
16+
* h747: add flash registers mirrored in bank2
1617

1718
* F2:
1819
* Fix incorrect bit position for Ethernet MMCTIMR TGFM (#689)

devices/common_patches/h7_dualcore_flash.yaml

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,19 @@ _add:
648648
description: Bank 1 ECC error address
649649
bitOffset: 0
650650
bitWidth: 15
651+
ACR_:
652+
description: FLASH access control register
653+
addressOffset: 0x100
654+
resetValue: 0x00000037
655+
fields:
656+
WRHIGHFREQ:
657+
description: Flash signal delay
658+
bitOffset: 4
659+
bitWidth: 2
660+
LATENCY:
661+
description: Read latency
662+
bitOffset: 0
663+
bitWidth: 4
651664
KEYR2:
652665
description: FLASH key register for bank 2
653666
addressOffset: 0x104
@@ -658,6 +671,17 @@ _add:
658671
description: Bank access configuration unlock key
659672
bitOffset: 0
660673
bitWidth: 32
674+
OPTKEYR_:
675+
description: FLASH option key register
676+
addressOffset: 0x108
677+
resetValue: 0x00000000
678+
access: write-only
679+
fields:
680+
OPTKEYR:
681+
description: FLASH option bytes control access unlock key
682+
bitOffset: 0
683+
bitWidth: 32
684+
661685
CR2:
662686
description: FLASH control register for bank 2
663687
addressOffset: 0x10C
@@ -869,6 +893,186 @@ _add:
869893
description: Bank 2 EOP2 flag clear bit
870894
bitOffset: 16
871895
bitWidth: 1
896+
OPTCR_:
897+
description: FLASH option control register
898+
addressOffset: 0x118
899+
resetValue: 0x00000001
900+
fields:
901+
SWAP_BANK:
902+
description: Bank swapping option configuration bit
903+
bitOffset: 31
904+
bitWidth: 1
905+
OPTCHANGEERRIE:
906+
description: Option byte change error interrupt enable bit
907+
bitOffset: 30
908+
bitWidth: 1
909+
MER:
910+
description: mass erase request
911+
bitOffset: 4
912+
bitWidth: 1
913+
OPTSTART:
914+
description: Option byte start change option configuration bit
915+
bitOffset: 1
916+
bitWidth: 1
917+
OPTLOCK:
918+
description: FLASH
919+
bitOffset: 0
920+
bitWidth: 1
921+
OPTSR_CUR_:
922+
description: FLASH option status register
923+
addressOffset: 0x11C
924+
resetValue: 0x00000000
925+
fields:
926+
SWAP_BANK_OPT:
927+
description: Bank swapping option status bit
928+
bitOffset: 31
929+
bitWidth: 1
930+
OPTCHANGEERR:
931+
description: Option byte change error flag
932+
bitOffset: 30
933+
bitWidth: 1
934+
IO_HSLV:
935+
description: I
936+
bitOffset: 29
937+
bitWidth: 1
938+
NRST_STBY_D2:
939+
description: D2 domain DStandby entry reset option status bit
940+
bitOffset: 25
941+
bitWidth: 1
942+
NRST_STOP_D2:
943+
description: D2 domain DStop entry reset option status bit
944+
bitOffset: 24
945+
bitWidth: 1
946+
BOOT_CM7:
947+
description: Arm Cortex
948+
bitOffset: 23
949+
bitWidth: 1
950+
BOOT_CM4:
951+
description: Arm Cortex
952+
bitOffset: 22
953+
bitWidth: 1
954+
SECURITY:
955+
description: Security enable option status bit
956+
bitOffset: 21
957+
bitWidth: 1
958+
ST_RAM_SIZE:
959+
description: ST RAM size option status
960+
bitOffset: 19
961+
bitWidth: 2
962+
IWDG_FZ_SDBY:
963+
description: IWDG Standby mode freeze option status bit
964+
bitOffset: 18
965+
bitWidth: 1
966+
IWDG_FZ_STOP:
967+
description: IWDG Stop mode freeze option status bit
968+
bitOffset: 17
969+
bitWidth: 1
970+
RDP:
971+
description: Readout protection level option status byte
972+
bitOffset: 8
973+
bitWidth: 8
974+
RST_STDY_D1:
975+
description: D1 domain DStandby entry reset option status bit
976+
bitOffset: 7
977+
bitWidth: 1
978+
NRST_STOP_D1:
979+
description: D1 domain DStop entry reset option status bit
980+
bitOffset: 6
981+
bitWidth: 1
982+
IWDG2_SW:
983+
description: IWDG2 control mode option status bit
984+
bitOffset: 5
985+
bitWidth: 1
986+
IWDG_SW:
987+
description: IWDG control mode option status bit
988+
bitOffset: 4
989+
bitWidth: 1
990+
BOR_LEV:
991+
description: Brownout level option status bit
992+
bitOffset: 2
993+
bitWidth: 2
994+
OPT_BUSY:
995+
description: Option byte change ongoing flag
996+
bitOffset: 0
997+
bitWidth: 1
998+
OPTSR_PRG_:
999+
description: FLASH option status register
1000+
addressOffset: 0x120
1001+
resetValue: 0x00000000
1002+
fields:
1003+
SWAP_BANK_OPT:
1004+
description: Bank swapping option configuration bit
1005+
bitOffset: 31
1006+
bitWidth: 1
1007+
IO_HSLV:
1008+
description: I
1009+
bitOffset: 29
1010+
bitWidth: 1
1011+
NRST_STBY_D2:
1012+
description: D2 domain DStandby entry reset option configuration bit
1013+
bitOffset: 25
1014+
bitWidth: 1
1015+
NRST_STOP_D2:
1016+
description: D2 domain DStop entry reset option configuration bit
1017+
bitOffset: 24
1018+
bitWidth: 1
1019+
BOOT_CM7:
1020+
description: Arm Cortex
1021+
bitOffset: 23
1022+
bitWidth: 1
1023+
BOOT_CM4:
1024+
description: Arm Cortex
1025+
bitOffset: 22
1026+
bitWidth: 1
1027+
SECURITY:
1028+
description: Security enable option configuration bit
1029+
bitOffset: 21
1030+
bitWidth: 1
1031+
ST_RAM_SIZE:
1032+
description: ST RAM size option configuration bits
1033+
bitOffset: 19
1034+
bitWidth: 2
1035+
IWDG_FZ_SDBY:
1036+
description: IWDG Standby mode freeze option configuration bit
1037+
bitOffset: 18
1038+
bitWidth: 1
1039+
IWDG_FZ_STOP:
1040+
description: IWDG Stop mode freeze option configuration bit
1041+
bitOffset: 17
1042+
bitWidth: 1
1043+
RDP:
1044+
description: Readout protection level option configuration bits
1045+
bitOffset: 8
1046+
bitWidth: 8
1047+
NRST_STDY_D1:
1048+
description: D1 domain DStandby entry reset option configuration bit
1049+
bitOffset: 7
1050+
bitWidth: 1
1051+
NRST_STOP_D1:
1052+
description: D1 domain DStop entry reset option configuration bit
1053+
bitOffset: 6
1054+
bitWidth: 1
1055+
IWDG2_SW:
1056+
description: IWDG2 control mode option configuration bit
1057+
bitOffset: 5
1058+
bitWidth: 1
1059+
IWDG_SW:
1060+
description: IWDG control mode option configuration bit
1061+
bitOffset: 4
1062+
bitWidth: 1
1063+
BOR_LEV:
1064+
description: Brownout level option configuration bit
1065+
bitOffset: 2
1066+
bitWidth: 2
1067+
OPTCCR_:
1068+
description: FLASH option clear control register
1069+
addressOffset: 0x124
1070+
resetValue: 0x00000000
1071+
fields:
1072+
CLR_OPTCHANGEERR:
1073+
description: OPTCHANGEERR reset bit
1074+
bitOffset: 30
1075+
bitWidth: 1
8721076
PRAR_CUR2:
8731077
description: FLASH protection address for bank 2
8741078
addressOffset: 0x128
@@ -955,6 +1159,58 @@ _add:
9551159
description: Bank 2 sector write protection option status byte
9561160
bitOffset: 0
9571161
bitWidth: 8
1162+
BOOT7_CURR_:
1163+
description: FLASH register boot address for Arm Cortex-M7 core
1164+
addressOffset: 0x140
1165+
resetValue: 0x00000000
1166+
fields:
1167+
BOOT_CM7_ADD1:
1168+
description: Arm Cortex-M7 boot address 1
1169+
bitOffset: 16
1170+
bitWidth: 16
1171+
BOOT_CM7_ADD0:
1172+
description: Arm Cortex-M7 boot address 0
1173+
bitOffset: 0
1174+
bitWidth: 16
1175+
BOOT7_PRGR_:
1176+
description: FLASH register boot address for Arm Cortex-M7 core
1177+
addressOffset: 0x144
1178+
resetValue: 0x00000000
1179+
fields:
1180+
BOOT_CM7_ADD1:
1181+
description: Arm Cortex-M7 boot address 1 configuration
1182+
bitOffset: 16
1183+
bitWidth: 16
1184+
BOOT_CM7_ADD0:
1185+
description: Arm Cortex-M7 boot address 0 configuration
1186+
bitOffset: 0
1187+
bitWidth: 16
1188+
BOOT4_CURR_:
1189+
description: FLASH register boot address for Arm Cortex-M4 core
1190+
addressOffset: 0x148
1191+
resetValue: 0x00000000
1192+
fields:
1193+
BOOT_CM4_ADD1:
1194+
description: Arm Cortex-M4 boot address 1
1195+
bitOffset: 16
1196+
bitWidth: 16
1197+
BOOT_CM4_ADD0:
1198+
description: Arm Cortex-M4 boot address 0
1199+
bitOffset: 0
1200+
bitWidth: 16
1201+
BOOT4_PRGR_:
1202+
description: FLASH register boot address for Arm Cortex-M4 core
1203+
addressOffset: 0x14C
1204+
resetValue: 0x00000000
1205+
fields:
1206+
BOOT_CM4_ADD1:
1207+
description: Arm Cortex-M4 boot address 1 configuration
1208+
bitOffset: 16
1209+
bitWidth: 16
1210+
BOOT_CM4_ADD0:
1211+
description: Arm Cortex-M4 boot address 0 configuration
1212+
bitOffset: 0
1213+
bitWidth: 16
9581214
CRCCR2:
9591215
description: FLASH CRC control register for bank 2
9601216
addressOffset: 0x150

0 commit comments

Comments
 (0)