With this in mind, I expected my software to run more-or-less the same on the Trinket M0 as it did on the Feather M0e, but to my dismay, the Trinket M0 spins through my main loop five times slower than the Feather M0e did. The software is identical between the the two boards except for where I changed the `board.<pin>` references to accommodate the different pin layout.
Unfortunately I don't have an oscilloscope to poke around and get hardware measurements, so I can't really *verify* anything other than "my code runs way slower", which isn't entirely helpful from a troubleshooting perspective. I wanted to post here just in case this is a known "issue" where boards with nearly identical MCUs run the same code at drastically different speeds.
I would very much appreciate if anyone has insight on what might be causing the speed difference I'm seeing between these boards. Judging by hardware specs alone, it seems like it should be entirely possible to write CircuitPython code that executes at consistent speeds across both boards, but that's not what I'm observing at all.
Thanks.
_______________________________
More details...
My software is sufficiently complex that it's not trivial to just rip small parts out to identify if there's a specific "area of slowness" on the Trinket, but here are some details for context:
My application is a "digital VU meter" of sorts. The only board peripherals I'm using is a single analog pin to read the raw value from a microphone, and a single digital pin to drive a strip of 10 neopixels (of the 3-wire variant). On the Feather M0e my application refreshes the entire neopixel strip 180+ times per second. With identical code (except the IO pins used), the Trinket M0 only achieves about 36 updates per second. The pins in use on each board are as follows:
Feather M0 Express:
- board.A1 (mic analog input)
- board.D12 (neopixel digital output)
- board.A1 (mic analog input)
- board.D3 (neopixel digital output)
- Feather M0 Express: adafruit-circuitpython-feather_m0_express-en_US-7.0.0.uf2 (SHA1: 4160abf562555ecb6e8434814c72863109bcbea5)
- Trinket M0: adafruit-circuitpython-trinket_m0-en_US-7.0.0.uf2 (SHA1: 1bc5e0d93ad4b5f425f1d1589daa33a8e3e7eff1)