Ok, I got this working, thanks for the help all.
Ended up using this :
From header file.....In C file....Solves the problem nicely on the RP2350 at least which is what I'm using ![Smile :)]()
Cheers.
Phill.
Ended up using this :
From header file.....
Code:
// DMA channels ids for 6809 bus interface readsextern uint8_t ReadDMA1;extern uint8_t ReadDMA2;// DMA channels ids for 6809 bus interface writesextern uint8_t WriteDMA1;extern uint8_t WriteDMA2;// Zero based interrupt numbers to use for each DMA channel, // RP2040 has 2 0..1, RP2350 has 4 0..3#define ReadDMA_IRQ 1#define WriteDMA_IRQ 2#define ClearReadIRQ() dma_hw->irq_ctrl[ReadDMA_IRQ].ints = 1u << ReadDMA2 #define ClearWriteIRQ() dma_hw->irq_ctrl[WriteDMA_IRQ].ints = 1u << WriteDMA2 #define ReadIRQFlag (dma_hw->irq_ctrl[ReadDMA_IRQ].ints & 1u << ReadDMA2)#define WriteIRQFlag (dma_hw->irq_ctrl[WriteDMA_IRQ].ints & 1u << WriteDMA2)Code:
// Setup dma interrupt handler to run after the byte has been read. dma_irqn_set_channel_enabled(ReadDMA_IRQ, ReadDMA2, true); irq_set_exclusive_handler(ReadDMA_IRQ+DMA_IRQ_0, ReadDMA_Handler); irq_set_enabled(ReadDMA_IRQ+DMA_IRQ_0, true);Cheers.
Phill.
Statistics: Posted by PhillHS — Fri Feb 27, 2026 10:52 pm