Skip to content

Commit 740dfb9

Browse files
committed
ci(stm32variant): syswkup update
Signed-off-by: Frederic Pillon <[email protected]>
1 parent dab1bed commit 740dfb9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

CI/update/stm32variant.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,21 +1248,21 @@ def print_peripheral():
12481248
# PinNamesVar.h generation
12491249
def manage_syswkup():
12501250
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.
12531254
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
12551256
# F446 start from 0
12561257
base_index = 1
12571258
if syswkup_list[0][2].replace("SYS_WKUP", "") == "0":
12581259
base_index = 0
12591260
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)]
12661266
for p in syswkup_list:
12671267
num = p[2].replace("SYS_WKUP", "")
12681268
num = int(num) if num else 1

0 commit comments

Comments
 (0)