Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8035

General • Re: Stop infinite DMA on a later-known transfer count

$
0
0
Maybe changing counting mode from 0x1 to 0x0 on the fly would do what you want:
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.
Mode is embedded in DMA: CH0_TRANS_COUNT (RP2350):
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.
Or maybe use a Null Trigger.

Statistics: Posted by gmx — Mon Jun 09, 2025 1:42 am



Viewing all articles
Browse latest Browse all 8035

Trending Articles