Actually I think you might be able to single-step the Espruino clock - but you'll be stepping it quite a lot before you see much happen on the pins!
Thanks! The more I think about it, more options makes sense - absolutely nothing stops us making chip-specific modules with useful clock speeds in.
... and the way I'd been calculating the correct clock divisors was quite time consuming as well, so wouldn't have been great for low power stuff.
Changing clock speeds can mess up the baud rate and PWM, but to fix it you just re-initialise them with Serial.setup/etc. However when you set the divisors right, you can start off running the peripherals with a high clock divisor, and can then lower that divisor as you lower the main clock speed, to keep them running at the same speed as before.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Actually I think you might be able to single-step the Espruino clock - but you'll be stepping it quite a lot before you see much happen on the pins!
Thanks! The more I think about it, more options makes sense - absolutely nothing stops us making chip-specific modules with useful clock speeds in.
... and the way I'd been calculating the correct clock divisors was quite time consuming as well, so wouldn't have been great for low power stuff.
Changing clock speeds can mess up the baud rate and PWM, but to fix it you just re-initialise them with
Serial.setup/etc
. However when you set the divisors right, you can start off running the peripherals with a high clock divisor, and can then lower that divisor as you lower the main clock speed, to keep them running at the same speed as before.