@@ -1248,21 +1248,21 @@ def print_peripheral():
1248
1248
# PinNamesVar.h generation
1249
1249
def manage_syswkup ():
1250
1250
if len (syswkup_list ) != 0 :
1251
- # Find the max range of SYS_WKUP to ensure it doesn't exceed
1252
- # the current maximum range of SYS_WKUP used by STM32LowPower
1251
+ # Find the max range of SYS_WKUP.
1252
+ # Ensure it is compatible with the current maximum range
1253
+ # used by STM32LowPower.
1253
1254
max_range = syswkup_list [- 1 ][2 ].replace ("SYS_WKUP" , "" )
1254
- max_range = int (max_range ) if max_range else 1
1255
+ max_range = int (max_range ) if max_range else 8
1255
1256
# F446 start from 0
1256
1257
base_index = 1
1257
1258
if syswkup_list [0 ][2 ].replace ("SYS_WKUP" , "" ) == "0" :
1258
1259
base_index = 0
1259
1260
max_range += 1
1260
- if max_range > 8 :
1261
- print (
1262
- f"Error: SYS_WKUP range exceeds the current maximum range of 8 --> { max_range } ."
1263
- )
1264
- exit (1 )
1265
- syswkup_pins_list = [[] for _ in range (8 )]
1261
+ # Ensure the max_range is at least 8
1262
+ # as some mcu PWR_WAKEUP_PINx while not SYS_WKUPx
1263
+ if max_range < 8 :
1264
+ max_range = 8
1265
+ syswkup_pins_list = [[] for _ in range (max_range )]
1266
1266
for p in syswkup_list :
1267
1267
num = p [2 ].replace ("SYS_WKUP" , "" )
1268
1268
num = int (num ) if num else 1
@@ -1280,6 +1280,8 @@ def manage_syswkup():
1280
1280
def print_pinamevar ():
1281
1281
# First check core version and search PWR_WAKEUP_*
1282
1282
syswkup_type = "PIN"
1283
+ if "STM32WB0" in mcu_family :
1284
+ syswkup_type = "PINNAME"
1283
1285
if mcu_core [0 ][1 ] == 33 :
1284
1286
# Search in stm32{series}xx_hal_pwr.h WR_WAKEUP_
1285
1287
pwr_header_file_path = (
0 commit comments