• The actual processor can be put into a mode that shuts everything down and wakes on external inputs, but that's not something Puck.js does, since the normal sleep functionality (that keeps the internal RTC running as well as all contents of RAM) gets power consumption down to 3uA (6+ years on a CR2032) which seemed more than enough.

    So yes, effectively Puck.js does sleep while keeping any counters and the RTC in memory, but that's because the processor is efficient enough at sleeping that it doesn't have to shut everything off.

    It's worth noting that Puck.js and other Bluetooth Espruino devices put themselves to sleep automatically, for example:

    setInterval(function() {
    }, 1000);

    Will end up with the processor asleep 99% of the time.

    All NRF.sleep() does is to turn off the Bluetooth advertising, which, when the processor isn't executing JS, is the main power drain (although even that, with the default config, is 40uA)

  • thanks for the clarification, as I said to fanoush I had the wrong idea about what type of sleep mode NRF_sleep() was, I'm only familiar with NRF SDK development in C so I was trying to understand what the puck was doing to apply it to my application.


Avatar for Gordon @Gordon started