Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: [Pixel mapping] 16 DMA, how to use them ?

  1. #1

    [Pixel mapping] 16 DMA, how to use them ?

    I'm developing a board that receives artnet data from various softwares (Madmapper, Touch Designer, Millumin, vvvv, node.js and max/msp have been tested) and spits that data to led pixels (ws2812b, ws2813, ws2815 and sk6812RGB have been tested).

    Everything is working great, I can control up to 4800 rgb leds @ 44fps (600 per outputs with 8 outputs thanks to the nice Octows2811 lib) with a teensy 3.2 (F_CPU@120MHz/SPI@30MHz) + w5500 ethernet chip (single socket/large buffers).

    On my next revision of my board I plan to use a teensy 3.6, and I read it has 16 DMA channels. I've been searching on the forums informations around that, and to be honest I'm reaching my limits understanding that.

    My question is: is there a way to use these 16 DMA channels to have 16 pixel strips outputs ? And if so, what would be the way to do it ?

    Below is the current revision of my board (only 4 outputs).


    Click image for larger version. 

Name:	vERr7gq.jpg 
Views:	75 
Size:	61.4 KB 
ID:	15949

    Xavier //

  2. #2
    Sorry to "up" the subject, but I'd really like to know if there is a way to use more DMA in order to achieve 16 pixel strips (600 leds each) outputs ? As it seems I have room for more when I check the platformio memory usage report (on a teensy 3.2):
    Memory Usage ->
    DATA:    [=         ]   6.2% (used 4036 bytes from 65536 bytes)
    PROGRAM: [=         ]  10.0% (used 26320 bytes from 262144 bytes)
    Thanks in advance,

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Quote Originally Posted by xavier.seingard View Post
    My question is: is there a way to use these 16 DMA channels to have 16 pixel strips outputs ? And if so, what would be the way to do it ?
    This patch is probably the best way.

    It uses the same 3 DMA channels as OctoWS2811 uses for 8 outputs, but extends it to 16 outputs.

    To learn how the DMA works, scroll to the bottom of the OctoWS2811 page

    Look for "OctoWS2811 Technical Details". This was written in the very early days of OctoWS2811, when we used to drive the PWM waveforms onto the pins and then trigger DMA from the pin's PORT registers. Since then, Freescale (now NXP) published better info about the timers in more recent datasheets. OctoWS2811 now triggers DMA directly from the timers in most cases, rather than having the timer drive a physical pin and then trigger the DMA from the actual voltage changes on the pin. But the idea is still basically the same. Each 3 has 3 timing events, the beginning of the cycle (rising edge), the early mid-point where a falling transition signals a 0 bit to the LEDs, and the late mid-point where the signal must always be low (a falling edge if the pin was 1). That's why 3 DMA channels are used. 1 DMA channel is needed for each hardware event, not 1 for each pin.

  4. #4
    Thanks Paul for the clarifications. I will try this ASAP and let you know about the results.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts