Search results

  1. E

    [posted] SmartLED Shield for Teensy 4 - Drive RGB Matrix with 10k+ Pixels

    If you mean chaining panels together output-to-input to create a larger total display, that's a standard feature of the library with options for different layout configurations. It's described in the readme here - scroll down to the paragraph that starts with "You can chain several panels...
  2. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Check you have all the parallel wires connected to the right pins... Or maybe try replacing SHIFTBUF WITH SHIFTBUFBYS, SHIFTBUFBBS, or SHIFTBUFBIS and see if that looks better.
  3. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Try this code... I modified your library's FlexIO_Config_MultiBeat, MulBeatWR_nPrm_DMA, and flexDma_Callback. You will need to update the single beat configuration for 24 bit PWIDTH and other stuff. In the header, you need to change MulBeatDataRemain from type uint16_t* to uint32_t*. I don't...
  4. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    I would think it can be much simpler with 32 bit formatted data... If you just write p->SHIFTBUF[0] = argb888Value, does that work? If you set FLEXIO_SHIFTCFG_PWIDTH(23) it should shift out 32 bits at a time, ignoring the upper 8 bits (alpha value).
  5. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Can you share a RGB888 version (non-DMA)? Not sure how the data is arranged in memory...
  6. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Sure, do you have it working with polling or interrupts already? You will probably want to have each pixel stored in one 32 bit word in memory (24 bits of data and 8 bits of padding) to work most effectively.
  7. E

    Frequency modulation via DMA

    I did something similar for the SmartMatrix library. Not sure if this is exactly what you need, but it uses DMA to update the timer registers with each cycle. I would recommend reading through the FlexPWM chapter of the reference manual - it has lots of extra features that might be useful. Here...
  8. E

    new SmartMatrix warnings with Arduino 2.0 or 2.1

    I just updated the library to fix these compiler warnings. Please download the latest version of the library here and see if it fixes the issue. https://github.com/pixelmatix/SmartMatrix
  9. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Please share that working code! As far as I know you are the first in this community to try parallel input with FlexIO.
  10. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Interesting, is this some FlexIO3 weirdness or is it the same 16-bit word swap issue that we had issues with in September 2021 in this thread?
  11. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    When I was experimenting with this I had weird issues with FlexIO3. The same exact code works on FlexIO2 but doesn't work or works inconsistently on FlexIO3. I didn't figure out exactly what the difference was. I do know that FlexIO3 is incompatible with DMA - it does not have any working...
  12. E

    Driving APA102 LEDs using FlexIO DMA?

    Looks great! Were you able to increase the frame rate? 240 FPS is the default frame rate so it should be possible to set it higher. With 128x64 pixels at 36 bit refresh depth you can get about 300 FPS for a HUB75 panel with SmartMatrix. I think 32x32 should achieve over 1000 FPS unless CPU...
  13. E

    Driving APA102 LEDs using FlexIO DMA?

    I believe the SmartMatrix library includes support for APA102 LEDs using an implementation of FlexIO on Teensy 4. The SmartLED shield also has the requisite connector to attach an APA102 array. This is in addition to HUB75. There's an example sketch here...
  14. E

    Ideas on a T4 parallel library using FlexIO

    I figured out a way to combine FlexIO1, FlexIO2, and FlexIO3 together into a single non-blocking parallel interface. This is exciting because it means it should be possible in theory to have a library that enables parallel output on any arbitrary set of FlexIO pins - up to 26 pins on T4.0, 32...
  15. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    @Rezo - I've made some good progress which might be useful to you. I successfully got the interrupt method working. Functional proof of concept here: https://github.com/easone/FlexIO_interrupt The ISR needs to clear the interrupt signal - this is done by writing to the TIMSTAT register in case...
  16. E

    Ideas on a T4 parallel library using FlexIO

    I've found that the FlexIO base clock can be overclocked to 480 MHz, so it may be possible. For such a high speed application I would want to avoid any interrupt driven bit reformatting. FlexIO2 on MicroMod should work (it has 13 contiguous pins and works with DMA). FlexIO3 on T4.1 might be an...
  17. E

    Ideas on a T4 parallel library using FlexIO

    Sounds like 8080 or 6800 style interfaces are common for LCDs like ILI948x. At least to start, I think my parallel library would be a low level library and would not emulate the whole interface, just the clock and data pins. Chip select, write/read enable, etc. would be outside the scope, and...
  18. E

    Ideas on a T4 parallel library using FlexIO

    Right - at least initially, the library will only support 16bit interfaces on T4.1 FlexIO3, but I think an interrupt based method can leave the processor free the majority of the time. Despite being noncontiguous on T4.0 and 4.1, the pins on FlexIO2 can support a DMA based 8 bit interface with...
  19. E

    Ideas on a T4 parallel library using FlexIO

    Some recent discussion about driving parallel interfaces with FlexIO has got me thinking about developing some kind of general library. Is this something that would be useful to the community? Ideas for features: Parallel output with a flexible number and order of pins 4, 8, 16 bit interfaces...
  20. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    That looks like a bad electrical connection on the D2 pin to me.
  21. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Yes, I think so. The SHIFTBUFBYS option allows hardware conversion of endianness for 32 bit words, but there isn't a built in option for 16-bit endianness conversion... I came up with an idea (more of a hack) to swap the upper and lower 16 bits of each word on-the-fly during the DMA transfer...
  22. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Let me make sure I understand the latest issue. You have an array of 16 bit pixels, which is stored in memory as little-endian bytes {LSB[0], MSB[0], LSB[1], MSB[1], LSB[2], MSB[2], LSB[3], MSB[3], ...}. When these bytes are copied to the FlexIO SHIFTBUF, they are shifted out in little-endian...
  23. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Looks like you're transferring only one half of your test image here, since it's an array of 32 16-bit values (64 bytes long): FLEXIO_8080_MulBeatWR_nPrm(0x02, tft_test_img, 32); As currently defined the third argument is the size in bytes, not the number of elements... Try using...
  24. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Please post your complete code that you're experiencing this issue with - probably some subtlety about the DMA with 16 bit instead of 8 bit source...
  25. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    This is right, and the DMA setup should be doing essentially the same thing - copying 32 bits from buf[0] to SHIFTBUF[0], then buf[1] to SHIFTBUF[1] etc. The source and destination addresses are incremented by 4 bytes after each copy (because of the SOFF and DOFF settings) and FlexIO isn't...
  26. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    It's weird. When you read the FLEXIO2_PARAM register after enabling FlexIO2, the value stored there indicates that there are 8 timers and 8 shifters on the chip rather than 4. Maybe the extra shifters are some kind of vestige of an earlier version of the chip?
  27. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    I'm not sure what might be causing that. When I run the code on a T4.0 the shift buffers appear to be loaded correctly with 0x05050505, which should be shifting out 0x05 one byte at a time... Does the same thing happen if you comment out the DMA setup and just copy 0x05050505 into the shift...
  28. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Hm, that doesn't seem quite right... the DMA transfer size (SSIZE and DSIZE) shouldn't vary with the number of shifters, it should always be 32 bits so the DMA engine copies a word from memory into each FlexIO shifter buffer. Try this code. It runs without errors and triggers the DMA callback...
  29. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    Here's my interpretation of Table 4-3 in the manual: DMA signal 0 = FlexIO1 Shifter 0 OR Shifter 1 DMA signal 1 = FlexIO2 Shifter 0 OR Shifter 1 DMA signal 64 = FlexIO1 Shifter 2 OR Shifter 3 DMA signal 65 = FlexIO2 Shifter 2 OR Shifter 3 If there are any signals for shifters 4-7, they are not...
  30. E

    T4 FlexIO - Looking back at my T4 beta testing library FlexIO_t4

    @Rezo I took a look through your code. Your DMA and FlexIO setups look good. The problem seems to be that FlexIO1 and FlexIO2 shifters 0-3 are the only ones that can generate DMA requests. I believe Shifters 4-7 do not have that capability. (Nor do any of the FlexIO3 shifters.) The following...
  31. E

    FlexIO "Extra" clock cycle on 8080 parallel setup

    Thanks for the update! This also helps explain something I had noticed which is that the SmartMatrix driver (which uses FlexIO at 480 MHz) doesn't work properly with the CPU clock below 600 MHz. Is FlexIO only specified to run at 240, so anything above that is undocumented?
  32. E

    FlexIO "Extra" clock cycle on 8080 parallel setup

    If I'm understanding correctly, you should be getting 4 clock pulses but it looks like you are getting 6 instead? Is there an extra pulse at the end as well as the beginning? I wonder if this is because you are only shifting 8 bits out of the 32-bit wide shifter before reloading instead of...
  33. E

    How many WS2812B can teensy4.1 Drive ?

    OctoWS2811 library is the best way to drive lots of WS2812B's. https://www.pjrc.com/teensy/td_libs_OctoWS2811.html Despite the name, on Teensy 4.1 it can drive LEDs on more than 8 pins in parallel - all the way up to 55 (the full number of digital pins). This is a cool capability that not too...
  34. E

    How many LEDS can teensy4.1 Drive ?

    For HUB75 panels, the clock speed limits you to about 10-20k pixels in one daisy chain, unless you make some serious compromises. You could use a low color depth perhaps (3bit color instead of 24bit). Refresh rates below about 200 Hz don't work well because they flicker noticeably. The panel...
  35. E

    SmartMatrix LIbrary, 64X32 RGB Panel, Teensey 4.1, and Raspberry Pi 3 advice

    No problem. In brief, the panel takes 14 inputs: 6 RGB lines, 5 row address lines, clock (CLK), output enable (OE), and latch (LAT). The Teensy shield drives these signals using only 9 Teensy pins, by having 5 of the RGB lines also drive the address lines through a latch chip. The LAT signal...
  36. E

    SmartMatrix LIbrary, 64X32 RGB Panel, Teensey 4.1, and Raspberry Pi 3 advice

    The Teensy shield uses row address latching hardware in addition to level shifters, so the library won't be compatible with your existing hardware. You can find a schematic here: https://github.com/pixelmatix/SmartMatrix/blob/master/extras/hardware/Teensy4/SmartLEDShield_Teensy4_V5_sch.pdf
  37. E

    SmartMatrix LIbrary, 64X32 RGB Panel, Teensey 4.1, and Raspberry Pi 3 advice

    There is a clock rate limit for a single chain of HUB75 RGB panels. SmartMatrix library can get pretty close to this limit, amounting to 96 million pixels * color bits per second. With 36 bit "high color settings" and 9*32*64 pixels, you should be able to achieve a screen refresh rate of 144 Hz...
  38. E

    Teensy 4.0 + RGB Matrix Shield V5 does not compile

    Are you actually using the SmartLED shield (https://docs.pixelmatix.com/SmartMatrix/shieldref.html?) You said you have the Adafruit RGB Matrix Shield, but that's only for Arduino-compatible boards, not Teensy 4.0. Unfortunately the MatrixClock example from SmartMatrix Library is old and has not...
  39. E

    Teensy 4.0 never initiates com port Windows 10

    The 4 pin cable can't provide power to the LED matrix because the 2x8 pin interface doesn't pass any power connections between the shield and the matrix, only data signals. The 4 pin cable can be used to power the shield and the Teensy if you are not connecting a USB cable. The LED matrix gets...
  40. E

    Teensy 4.1 How to start using FlexIO?

    Another cool application of FlexIO is Jean-Marc's VGA interface here: https://forum.pjrc.com/threads/62362-VGA-out-for-Teensy-4-0-4-1/
  41. E

    Teensy 4.1 How to start using FlexIO?

    I think you're right, shifters 4-7 don't have the ability to generate DMA triggers when their buffers are empty. However, depending on application it may suffice to use the triggers from shifters 0-3 to reload the buffers if all the shifters are operating simultaneously or in a daisy-chained...
  42. E

    Teensy 4.1 How to start using FlexIO?

    I'm not sure exactly what the problem was, maybe it was a DMA or triggering issue, or maybe it was just a mistake on my part. The fact that you got your example working on the extra shifters is great evidence that they do work though! Yes, the FlexIO peripheral runs happily with the 480 MHz...
  43. E

    Teensy 4.1 How to start using FlexIO?

    Awesome writeup! I noticed too that the chip behaves as if it has extra shifters. In fact my SmartMatrix driver code makes use of an undocumented fifth FlexIO shifter, but somehow I was of the impression that the extra shifters were only partially functional... At least in some cases. If...
  44. E

    Looking for an example of how to use FlexPWM and DMA together (Teensy 4.1)

    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... It looks like DShot is pretty similar to the WS2811 protocol. It may be possible to use a DMA to...
  45. E

    [posted] VGA out for Teensy 4.0/4.1

    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 row before the FlexIO has shifted out all the data, so some data is being lost. With 4 shift...
  46. E

    [posted] VGA out for Teensy 4.0/4.1

    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 4 shift buffers. Set SHIFTCFG[INSRC] = 1 for each shifter to use the next shifter's output as...
  47. E

    [posted] VGA out for Teensy 4.0/4.1

    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 number of interrupts is to use all four 32-bit shift buffers, which could hold 16 pixels worth...
  48. E

    [posted] SmartLED Shield for Teensy 4 - Drive RGB Matrix with 10k+ Pixels

    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 such a board, I can provide more details. SmartMatrix library supports those configurations as well.
  49. E

    [posted] SmartLED Shield for Teensy 4 - Drive RGB Matrix with 10k+ Pixels

    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 shield provides an option to switch from pin 8 to pin 7, so that would enable sound input (but...
  50. E

    [posted] SmartLED Shield for Teensy 4 - Drive RGB Matrix with 10k+ Pixels

    Congrats! I'm very happy with how the performance turned out. I believe this is the first LED shield designed for Teensy 4!
Back
Top