The Convoy biscotti driver changes the MCU clock speed at the lowest level. Behavior depends on which version of the driver you got, but if it’s running at 36 kHz it’s the old version. That one uses SPEED/16 for moon, SPEED/2 for levels 1 and 2, and then full speed for everything above. Because the prototype driver hardware had really slow leading edges on each pulse, so I had to slow it down when the pulses were narrow.

But then the hardware totally changed in production, and they got the fuse values wrong, so the first batch runs twice as fast as intended and isn’t calibrated correctly. :person_facepalming:

http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/view/head:/ToyKeeper/bistro/biscotti/biscotti.c#L453