Hi - did you consider using digitalPulse with an array? That can be pretty accurate to get the repetition.
digitalPulse
Also which firmware are you on? In 2v13 the accuracy improved a lot.
But... yes, there is free hardware. What's used is shown at the top of https://github.com/espruino/Espruino/blob/master/targets/nrf5x/jshardware.c and there's actually an example of doing PWM using hardware timers (as part of a capacitive sense example) at:
https://www.espruino.com/NRF52LL#hardware-capacitive-sense-on-two-pins
@Gordon started
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.
Hi - did you consider using
digitalPulse
with an array? That can be pretty accurate to get the repetition.Also which firmware are you on? In 2v13 the accuracy improved a lot.
But... yes, there is free hardware. What's used is shown at the top of https://github.com/espruino/Espruino/blob/master/targets/nrf5x/jshardware.c and there's actually an example of doing PWM using hardware timers (as part of a capacitive sense example) at:
https://www.espruino.com/NRF52LL#hardware-capacitive-sense-on-two-pins