I'm not sure whether FlexPWM is useful to transmit a finite stream of pulses - it is possible to use DMA to vary the pulse width but making the stream start and stop precisely could be difficult...
...
Type: Posts; User: easone
I'm not sure whether FlexPWM is useful to transmit a finite stream of pulses - it is possible to use DMA to vary the pulse width but making the stream start and stop precisely could be difficult...
...
I don't know exactly what's wrong without seeing the full code, but if you have TCD->DOFF = 0 with minorLoopIterations = 4 then your DMA is copying into single destination SHIFTBUF0 four times in a...
I haven't been able to test the following for VGA, but it is nearly the same as the configuration I am using for the SmartMatrix driver. Please forgive any errors!
First, you need to configure all...
You could always use 8 bits of FlexIO3... It would be more processor intensive because you would need to use an interrupt to load the shift buffer instead of DMA. One thing you can do to decrease the...
By the way, it's possible to use a pinout that leaves all the audio pins free, but it needs pin 32 (so you either need to use T4.1 or solder to the back of T4.0). If anyone is interested in building...
You have a great point! In order to get the right pins for FlexIO without resorting to any of the T4.0 back side pins, it's necessary to block either pin 7 or pin 8 from the audio board. However, the...
Congrats! I'm very happy with how the performance turned out.
I believe this is the first LED shield designed for Teensy 4!
About the FlexIO shift width register...
FlexIO only has 1,2,4,8,16, and 32 bit shift modes.
FLEXIO_SHIFTCFG_PWIDTH(x) configures for x+1 parallel output bits, and the shifter mode is the...
Check out this thread for more info:
https://forum.pjrc.com/threads/57698-Parallel-IO-is-it-possible
The 32 bit register you want to read/write to is GPIO6_DR.
Note the usage of GPIO6 instead...
Your best bet on T4.1 is probably GPIO1 which has bits 16-31 available on pins 14-23, 26, 27, and 38-41.
You can see the detailed pin assignments here: ...
That makes sense. If you trigger two separate DMA transfers, even if they are linked, the DMA engine takes some extra overhead to handle them one after the other (and can also be interrupted by...
Awesome! Any videos of it working that you can share?
I was curious so I looked at your FlexIO setup. I'm sure you're aware about this line configuring the bit width:
parallelWidth =...
Kurt is right - DMA can only access GPIO1-4 and not GPIO6-9. In your case, you need to set your destination to GPIO2 instead of GPIO7.
You also need to set the IOMUXC_GPR_GPR27 register to select...
Also, Louis the creator of SmartMatrix (pixelmatix.com) is planning to release a new shield for Teensy 4.0/4.1 with the same form factor, but a different pinout. It will be totally plug-and-play, no...
Thanks! I finally got a full port of the library working with layers and the SmartMatrix API and so on. There are still some bugs I'm working out but it's functional. Let me know if you encounter any...
The DMA TCD is accessed using the DMAChannel class that Paul wrote. You need the DMAChannel object associated with your transaction, and then the TCD structure is just a member variable of that...
I'm currently working on the software side to get the SmartMatrix library working with T4.0/T4.1. I'll update that other thread once I have some progress. The existing Pixelmatix shield is the best...
@defragster - how does EXTMEM access compare to normal or DMAMEM access in terms of speed?
Also, can EXTMEM arrays be initialized unlike DMAMEM ones?
@potatotron - nice work! I look forward to seeing your demo. FYI, I got slower performance when using DMA to write to GPIO, something like 45 ns per 32 bit DMA transfer...
Once I get my hands on a...
What version of Teensyduino are you using? FLASHMEM was added in 1.49. Without it, there is no performance impact but there will be increased memory utilization.
LuisHS - yes, that's correct.
UPDATE: the sketch has been updated to support multi-panel displays, and now uses a software interrupt to refill the matrix row buffer continuously. It now runs way,...
Actually, you are fine. Check pages 310-311 of the reference manual. LPSPI3 can be muxed to pins 0, 1, 26, and 27.
Assuming you are using a custom circuit instead of the shield, there's a small amount of flexibility. We still need to use at least two of the pins 10-13 because of the limited number of FlexIO2...
LuisHS, the schematic for the shield is in "SmartLEDShield_V4_sch.pdf" here: https://github.com/pixelmatix/SmartMatrix/blob/master/extras/hardware
It uses the 74x245 as a level converter and it uses...
Wow, Marc, those displays are very impressive! Pretty amazing what the rPi can do here.
My code is driving the matrix at 24 MHz which is close to the maximum clock speed the matrix can support. In...
1958619587
For a little while, I've been working on adapting the SmartMatrix library to Teensy 4.0 so I can drive a bunch of these Jumbotron-type LED matrices. Teensy 4.0 is attractive for this...
Another thing is that FlexIO generates timer and clock signals which can also be configured to output to external pins. In that case the timer pins can be arbitrary. So you could for example use...
For posterity on this forum, here is a detailed answer...
If you are using GPIO:
Pins 0-1 and 14-27 are on GPIO1 (16 pins)
Pins 6-13 and 32 are on GPIO2 (9 pins)
Pins 28, 30, and 31 are on...
Yeah, FlexIO can do this with zero processor overhead... Although it may be tricky to set up. I posted some example code doing 4bit parallel output from a buffer at 40MHz with FlexIO:...
You can write directly to the GPIO register to change multiple bits in parallel. You must write 32 bits at a time, but only a subset are available as real external pins due to the T4.0 board design. ...
Awesome! Can you share a little about your method to provide output on an arbitrary set of 8 pins?
It looks like you set up DMA to transfer 32 bits to each of GPIO1, GPIO2, GPIO3, and GPIO4 in...
Here's some example code... this shifts out data in parallel to pins 10-13 every 25 ns. It requires KurtE's FlexIO_t4 library (https://github.com/KurtE/FlexIO_t4). (Note that there's a typo in that...
It might not help you specifically since it isn't compatible with OctoWS2811, but Ward demonstrated a way to drive WS2811 strips using the FlexIO and some external shift registers:...
Yes, this might be a good use for FlexIO. Unlike the GPIO ports which can only output 32 bit writes, FlexIO allows you to output parallel data to 4 pins (or 8, 16, or 32) and have it clocked out at a...
The SmartMatrix library uses double buffering so the memory usage is twice as large as you would expect. In my case, with a 128x64 screen size and 16 bit color depth * 3 color channels (6 bytes per...
I'm working on a project that drives 4 panels (each 64x32 pixels) using a T3.6 and SmartMatrix. Overclocked to 240Mhz, there's just enough speed to refresh the screens at 100-120 Hz (with 16 bit per...