You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Thanks - I'll look into this. Just did a quick check and:

    function onTimer() {
    var i;
    setInterval(function() {
      if (i) {
        i = undefined;
      } else i = setInterval(onTimer,10);
    }, 1000);

    You'd expect the LED to stay the same brightness. If you don't specify a frequency then it's fine so I assume that it's resetting the frequency even when there's no need.

    Is there any other way with more low level control to update PWM's values?

    Yes, there is - you could actually look at the nRF52832 reference manual and then poke values directly into the timer peripheral after it is set up.

    Hopefully I'll be able to get this fixed pretty quickly though.


Avatar for Gordon @Gordon started