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

  • I think I tend to disagree. Console logging from my experience is very useful for the QA and debug processes, and if we have them enabled for dev and QA process only, and then release a version of the code that has them disabled, we haven't confidently validated that exact binary image which will be deployed to production/the field.

    The real show stopper for me is not having that capability in our QA process. Detecting and root causing bugs becomes significantly more difficult with no logging available and will likely slow down the way we can iterate as we're trying to release a version of firmware.

    This is a type of functionality I have accomplished many times (although outside of Zephyr and the ncs framework), so I know it's possible, but I'd rather avoid having the modify the kernel code to put the appropriate hooks into place to accomplish.

Reply
  • I think I tend to disagree. Console logging from my experience is very useful for the QA and debug processes, and if we have them enabled for dev and QA process only, and then release a version of the code that has them disabled, we haven't confidently validated that exact binary image which will be deployed to production/the field.

    The real show stopper for me is not having that capability in our QA process. Detecting and root causing bugs becomes significantly more difficult with no logging available and will likely slow down the way we can iterate as we're trying to release a version of firmware.

    This is a type of functionality I have accomplished many times (although outside of Zephyr and the ncs framework), so I know it's possible, but I'd rather avoid having the modify the kernel code to put the appropriate hooks into place to accomplish.

Children
No Data
Related