nRF54L15 CPU idle thread hooks

Hi,

I would like to be able to hook into the system idle thread before/after the CPU is put to sleep to do some more custom power management things. Is there a way to do that easily (using NCS v2.9.0)?

For context, as a baseline I would like to have the serial console/logging interface active while the CPU is awake for debug and QA purposes, but disable everything to get into the lowest power state possible when the CPU is asleep. So simply disabling the CONFIG_LOG and CONFIG_SERIAL at build time simply isn't good enough for my use case.

Thanks!

Bryan

Parents
  • Hello,

    I don't think it makes sense to enable and disable logging like that, when going in and out of sleep. Besides, you would typically enable logs only while developing, and turn it off before going into production, so it wouldn't affect the current consumption. 

    I suspect we are looking at an XY problem. What is it that makes you want to turn off logging before going to sleep in the first place? Why do you not just turn it off when you want to do your measurements, and turn it back on later?

    Best regards,

    Edvin

Reply
  • Hello,

    I don't think it makes sense to enable and disable logging like that, when going in and out of sleep. Besides, you would typically enable logs only while developing, and turn it off before going into production, so it wouldn't affect the current consumption. 

    I suspect we are looking at an XY problem. What is it that makes you want to turn off logging before going to sleep in the first place? Why do you not just turn it off when you want to do your measurements, and turn it back on later?

    Best regards,

    Edvin

Children
No Data
Related