Maybe changing counting mode from 0x1 to 0x0 on the fly would do what you want:
Mode is embedded in DMA: CH0_TRANS_COUNT (RP2350):Mode 0x0 is the default: TRANS_COUNT decrements once for every bus transfer, and the
channel halts once TRANS_COUNT reaches zero and all in-flight transfers have finished.
Or maybe use a Null Trigger.When the channel is active, reading this register shows the number of
transfers remaining, updating automatically each time a write transfer
completes.
Writing this register sets the RELOAD value for the transfer counter. Each time
this channel is triggered, the RELOAD value is copied into the live transfer
counter. The channel can be started multiple times, and will perform the same
number of transfers each time, as programmed by most recent write.
Statistics: Posted by gmx — Mon Jun 09, 2025 1:42 am