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 Kentaro

    After a chat with one of the in-house RTOS experts they also recommend that the easiest/best way to do this is to have a low-priority thread running when you want to avoid the project to go into idle mode.

    There is a complex way to do this as well through the power management using using pm_system_suspend, but there are a lot of things that could go wrong, so we wouldn't recommend that unless you want some extra (unnecessary) work on your hands.

    Best regards,

    Simon

Reply
  • Hi Kentaro

    After a chat with one of the in-house RTOS experts they also recommend that the easiest/best way to do this is to have a low-priority thread running when you want to avoid the project to go into idle mode.

    There is a complex way to do this as well through the power management using using pm_system_suspend, but there are a lot of things that could go wrong, so we wouldn't recommend that unless you want some extra (unnecessary) work on your hands.

    Best regards,

    Simon

Children
Related