File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,17 @@ uint32_t _PM_timerStop(Protomatter_core *core) {
196
196
return count ;
197
197
}
198
198
199
- // See notes in core.c before the "blast" functions
199
+ // See notes in core.c before the "blast" functions.
200
+ // The NOP counts here were derived by monitoring on a fast logic analyzer,
201
+ // aiming for 20 MHz clock at 50% duty cycle (for the unrolled parts of the
202
+ // 'blast' loop...every Nth bit is somewhat longer), and tested for each
203
+ // F_CPU setting. This seems to have the broadest compatibility across many
204
+ // matrix varieties. Only one, a 64x32 flex matrix, showed some artifacts at
205
+ // the end of a 4-matrix chain at 120-150 MHz F_CPU -- either use in shorter
206
+ // chains, or can kludge it by running at 180-200 MHz or by moving one NOP
207
+ // from the Low to High section (but which then causes issues with other
208
+ // matrix types, so it's not done here), unfortunately no means of run-time
209
+ // configuration for this.
200
210
#if F_CPU >= 200000000
201
211
#define _PM_clockHoldHigh asm("nop; nop");
202
212
#define _PM_clockHoldLow asm("nop; nop; nop; nop; nop");
You can’t perform that action at this time.
0 commit comments