PIC32MK single DMA channel speed

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
Danpaq
Posts: 1
Joined: 06 Dec 2022 07:48

PIC32MK single DMA channel speed

#1 Post by Danpaq » 06 Dec 2022 08:12

Hi, curious if anyone else has experience doing high-speed DMA from I/O ports and how fast they are able to go.

I'm trying to read PORTB at 20 Msps and DMA it into a buffer... I just set a timer to 20 MHz and trigger a single DMA channel off the timer to read a 2 byte cell from PORTB into a 20 kB block RAM buffer. What I see is as I increase the timer frequency, my DMA samples artificially slow down to maybe 7 Msps, well slower than the timer.

Strangely, if I enlist 5 DMA channels (rather than a single DMA channel), and have them do an interleaved trigger (just like my ADCs) each at 4 Msps, it all works fine -- but it leaves me with a bit more CPU work for buffer reassembly...

Would anyone know if there are any published performance characteristics for the DMA channels? Or if there might there be a trick for me to get a single DMA channel to go faster, and avoid the added cost of interleaved reassembly?

I'm running 1:1 PBCLK2 as well as 120 MHz SYSCLK; my CPU is basically running "nop"s while I wait for DMA to complete -- peeking at a volatile memory counter only very rarely...

Thanks for any thoughts! This is so fun!!!
Busty Girl Gets Ass Fu*ked and Covered in Cum - https://toppornsites.pro
Step Mommy shows her daughter how to properly suck cock - https://toppornsites.club
Journey to the Inside of the Pussy - https://bestfreepornsites.net

Post Reply

Return to “mikroC PRO for PIC32 General”