Is there a way to prevent the CPU from automatically entering sleep mode?

Hi,

I understand that by default in the nRF Connect SDK, the CPU automatically enters sleep mode when no threads are running.

I find this very convenient and I like it.

However, in the product I am working on, there are periods when we don't want the CPU to enter sleep mode, even when it is idle, such as when waiting for a specific event, even at the cost of power efficiency. I'm sorry, but I can't provide more details on why we need this due to confidentiality.

Therefore, I would like to dynamically enable and disable the automatic sleep mode during program execution.

(While one option could be to create a low-priority thread that runs a busy loop, I don't consider this a smart solution.)

Any guidance would be greatly appreciated.

Best regards,

Kentaro

Parents
  • Hi

    I don't think there is a way to dynamically enable/disable the automatic sleep mode unfortunately, as this is an inherent behavior in the Zephyr RTOS if I recall correctly. But let me discuss this with a colleague and get back to you with a surefire answer tomorrow. I think having a low-priority thread running would be the way to go though.

    Best regards,

    Simon

Reply
  • Hi

    I don't think there is a way to dynamically enable/disable the automatic sleep mode unfortunately, as this is an inherent behavior in the Zephyr RTOS if I recall correctly. But let me discuss this with a colleague and get back to you with a surefire answer tomorrow. I think having a low-priority thread running would be the way to go though.

    Best regards,

    Simon

Children
Related