Skip to content

Commit 9762b00

Browse files
authored
disable all IRQs in dma_chanel_cleanup - fixes for RP2350 (#2060)
1 parent 6bb44dd commit 9762b00

File tree

1 file changed

+3
-2
lines changed
  • src/rp2_common/hardware_dma

1 file changed

+3
-2
lines changed

src/rp2_common/hardware_dma/dma.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ void dma_channel_cleanup(uint channel) {
7575
// Disable CHAIN_TO, and disable channel, so that it ignores any further triggers
7676
hw_write_masked( &dma_hw->ch[channel].al1_ctrl, (channel << DMA_CH0_CTRL_TRIG_CHAIN_TO_LSB) | (0u << DMA_CH0_CTRL_TRIG_EN_LSB), DMA_CH0_CTRL_TRIG_CHAIN_TO_BITS | DMA_CH0_CTRL_TRIG_EN_BITS );
7777
// disable IRQs first as abort can cause spurious IRQs
78-
dma_channel_set_irq0_enabled(channel, false);
79-
dma_channel_set_irq1_enabled(channel, false);
78+
for(uint i=0; i < NUM_DMA_IRQS; i++) {
79+
dma_irqn_set_channel_enabled(i, channel, false);
80+
}
8081
dma_channel_abort(channel);
8182
// finally clear the IRQ status, which may have been set during abort
8283
dma_hw->intr = 1u << channel;

0 commit comments

Comments
 (0)