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

Related