adafruit / Adafruit_Protomatter

RGB matrix library for Arduino
70 stars 24 forks source link

M4 Timing Adjustments for Broader Matrix Compatibility #63

Closed PaintYourDragon closed 1 year ago

PaintYourDragon commented 1 year ago

Some M4-specific timing adjustments to help this work with both old and new matrices. Across all F_CPU settings, aims for 20 MHz throughput with 50% duty cycle on CLK (for the unrolled parts of the "blast" loop -- every Nth pulse will diverge from that a bit). Tested on logic analyzer and on six distinct varieties of 64x32 matrix. Additionally: a fix for small-chunk-long-chains and some comments and README notes on dealing with NOPs in the future.