Skip to content

Commit e5951d9

Browse files
committed
some interrupt and signal additions
1 parent edace48 commit e5951d9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

stm32-data-gen/src/interrupts.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl ChipInterrupts {
379379
if irqs.len() != 1 && signal != "GLOBAL" {
380380
irqs.retain(|irq| irq != &p.name);
381381
}
382-
382+
383383
if irqs.len() != 1 {
384384
panic!(
385385
"dup irqs on chip {:?} nvic {:?} peri {} signal {}: {:?}",
@@ -492,7 +492,7 @@ fn valid_signals(peri: &str) -> Vec<String> {
492492
("RCC", &["RCC", "CRS"]),
493493
("MDIOS", &["GLOBAL", "WKUP"]),
494494
("ETH", &["GLOBAL", "WKUP"]),
495-
("LTDC", &["GLOBAL", "ER"]),
495+
("LTDC", &["GLOBAL", "ER", "LO", "ERR"]),
496496
(
497497
"DFSDM",
498498
&["FLT0", "FLT1", "FLT2", "FLT3", "FLT4", "FLT5", "FLT6", "FLT7"],
@@ -503,11 +503,13 @@ fn valid_signals(peri: &str) -> Vec<String> {
503503
("WWDG", &["GLOBAL", "RST"]),
504504
("USB_OTG_FS", &["GLOBAL", "EP1_OUT", "EP1_IN", "WKUP"]),
505505
("USB_OTG_HS", &["GLOBAL", "EP1_OUT", "EP1_IN", "WKUP"]),
506-
("USB", &["LP", "HP", "WKUP"]),
506+
("USB", &["LP", "HP", "WKUP", "USB1", "USB2", "OTG_HS"]),
507507
("GPU2D", &["ER"]),
508508
("SAI", &["A", "B"]),
509509
("ADF", &["FLT0"]),
510510
("RAMECC", &["ECC"]),
511+
("RAMCFG", &["BKP", "ECC"]),
512+
("DCMIPP", &["CSI"]),
511513
];
512514

513515
for (prefix, signals) in IRQ_SIGNALS_MAP {
@@ -528,6 +530,8 @@ static PICK_NVIC: RegexMap<&str> = RegexMap::new(&[
528530
("STM32(L5|U5|H5[2367]|WBA5[245]).*", "NVIC2"),
529531
// Exception 3: NVICs are split for "bootloader" and "application", not sure what that means?
530532
("STM32H7[RS].*", "NVIC2"),
533+
// Exception 4: NVICS are split for bootloader NVIC, secure NVIC1 and non-secure NVIC2.
534+
("STM32N6.*", "NVIC2"),
531535
// catch-all: Most chips have a single NVIC, named "NVIC"
532536
(".*", "NVIC"),
533537
]);

stm32-data-gen/src/rcc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ impl ParsedRccs {
353353
("u5", "ADC"),
354354
("n6", "I2C4"),
355355
("n6", "SDMMC1"), // HCLK2 is corrext per Cube and Docs so no mux check
356+
("n6", "SDMMC2"), // HCLKU is corrext per Cube and Docs so no mux check
356357
];
357358

358359
let kernel_clock = match mux {

0 commit comments

Comments
 (0)