Requirements For Not Entering Emulated System Off Mode

Background

I had a question regarding Debug Interface mode and its relationship to entering true system off mode versus emulated system off mode (ie WFE in a while(1)). 

Recently we had an issue where we were inadvertently leaving the CxxxPWRUPREQ bits set via SWD and as expected, we entered emulated system off mode. We addressed the issue by clearing the CxxxPWRUPREQ bits via SWD. 

 

Questions

1. The Debug Interface Mode states "The device remains in Debug Interface mode when the debugger requests power through CxxxPWRUPREQ. Otherwise, the device is in normal mode. When a debug session is over, the device must be set to normal mode by the external debugger, followed by a pin reset."

I saw this related case saying that there is an equivalent to the pin reset wit just SWD connection. 

Can you confirm that the pin reset (or CTRL-AP hard reset) explicitly required in order to guarantee that we enter true system off mode (rather than emulated system off mode)?

2. There does not seem to be a good way to detect if Debug Interface Mode is active on the nRF54L15, given that the  CxxxPWRUPREQ bits are not memory-mapped and inaccessible to the nRF54L15, as far as I can tell.

Am I missing something? or is there truly no way that the nRF54L15 can detect if Debug Interface Mode is active? 

My goal with that would be to perform some alternative behavior, rather that getting stuck in a `while(1) WFE();` loop. 

 

3. Assume that answer to #2 is "No, nRF54L15 can't tell if Debug Interface Mode is active or not". Can you think of any way for an application to potentially "catch" being in the WFE() loop as part of emulated system off? 

Based on what I've researched, the answer is that the WDT nor HW Timers can be used to catch this condition. But I was curious what solution you might have seen others employ to try and solve this problem (have application exit emulated system off and reset after X seconds). 

 

Parents
  • Hello Blake!

    Thanks for reaching out and thanks for the extra background.

    1. It is stated in the debug interface mode (same link that you provided) that pin reset is recommended in order to reduce overall power consumption. Have you tried measuring the current draw during System OFF mode with and without pin reset after exiting debug interface mode?

    2. From what I know it's not possible on the nRF54L15 to check if the system is in debug interface mode in real time, but if the system is woken up from system OFF by a debugger connection this is registered with the RESETREAS.DIF flag. Hence, it's easy to know if the device is in debug interface mode if the device is woken up by the debugger, but not if the debugger is attached while running. Does that help you in any way?

    3. I need to do some more digging on this and will get get back to you.

    Best regards,
    Carl Richard

Reply
  • Hello Blake!

    Thanks for reaching out and thanks for the extra background.

    1. It is stated in the debug interface mode (same link that you provided) that pin reset is recommended in order to reduce overall power consumption. Have you tried measuring the current draw during System OFF mode with and without pin reset after exiting debug interface mode?

    2. From what I know it's not possible on the nRF54L15 to check if the system is in debug interface mode in real time, but if the system is woken up from system OFF by a debugger connection this is registered with the RESETREAS.DIF flag. Hence, it's easy to know if the device is in debug interface mode if the device is woken up by the debugger, but not if the debugger is attached while running. Does that help you in any way?

    3. I need to do some more digging on this and will get get back to you.

    Best regards,
    Carl Richard

Children
Related