Skip to content

Commit 890a925

Browse files
committed
gpdma: enable interrupts in into_future; enable interrupts in example
1 parent 1280509 commit 890a925

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/spi-async-rtic.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ systick_monotonic!(Mono, 1000);
1919
#[app(device = pac, dispatchers = [USART1, USART2], peripherals = true)]
2020
mod app {
2121

22-
use stm32h5::stm32h503::GPDMA1;
22+
use stm32h5::stm32h503::{GPDMA1, NVIC};
2323

2424
use super::*;
2525

@@ -80,6 +80,11 @@ mod app {
8080
)
8181
.use_dma_duplex(tx_ch, rx_ch);
8282

83+
unsafe {
84+
NVIC::unmask(pac::interrupt::GPDMA1_CH0);
85+
NVIC::unmask(pac::interrupt::GPDMA1_CH1);
86+
};
87+
8388
tick::spawn().unwrap();
8489
spi_transfer::spawn().unwrap();
8590
(

0 commit comments

Comments
 (0)