This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to achieve low interrupt latency from sleep ?

Hello, i'm using a nRF52840 on a PCA10056 and want to wake up from __WFE() with a minimum delay. When i'm using the debugger, i achieve a low latency but without the debugger, the latency is increased by ~14us. What should i do for achieving the same low latency with or without debugger ?

Parents
  • Hi Nicolas

    You can use the constant latency sub power mode to keep the clock running during sleep, which will ensure a quicker wakeup.

    To enable this mode simply activate the CONSTLAT task like this, before entering sleep:

    NRF_POWER->TASKS_CONSTLAT = 1;
    

    Please be aware that this will increase the sleep current significantly, so if you need low sleep currents you might want to reconsider.

    For more information about the sub power modes, please refer to chapter 16.4.1 on page 73 of the nRF52840 datasheet.

    Best regards
    Torbjørn

Reply
  • Hi Nicolas

    You can use the constant latency sub power mode to keep the clock running during sleep, which will ensure a quicker wakeup.

    To enable this mode simply activate the CONSTLAT task like this, before entering sleep:

    NRF_POWER->TASKS_CONSTLAT = 1;
    

    Please be aware that this will increase the sleep current significantly, so if you need low sleep currents you might want to reconsider.

    For more information about the sub power modes, please refer to chapter 16.4.1 on page 73 of the nRF52840 datasheet.

    Best regards
    Torbjørn

Children
Related