This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Resume the state of registers and memory

Hi There,

I try to develop an application in intermittent conditions,  it will off work frequently as for lacking the energy. 

I try to resume the application from the last losing point rather than the starting point.

How should I do?

Regards,

Gaosheng Liu

Parents
  • Hello,

    I try to develop an application in intermittent conditions,  it will off work frequently as for lacking the energy. 

    How frequent and how long are these sleep intervals?

    I try to resume the application from the last losing point rather than the starting point.

    If you would like it to resume from the previous point, rather than from reset, you will need to use SYSTEM_ON sleep.
    In SYSTEM_ON sleep the CPU is idling in a low-power state, and will wake on any event.
    SYSTEM_OFF sleep has the lowest power consumption, but it will reset on wake.

    You could see how SYSTEM_ON sleep is implemented and used in the ble_peripheral examples of the SDK. The idle_state_handler function puts the CPU in SYSTEM_ON sleep from the main context.

    Best regards,
    Karl

  • Puls a question, How much the system status can be stored?  what's the time and energy consumption of the resuming?

  • lgs said:
    Nice to see you again!

    Likewise, Gaosheng!

    lgs said:
    According to your indications, I am reading the corresponding doc and try to see if can achieve the aim. It may need much time to do it. I will let you know the result then.

    In my previous question I asked which of the two scenarios I detailed (SYSTEM_ON vs SYSTEM_OFF) that applied to your situation - because I have not fully understood which of the two you mean when you talk about sleep and the requirements of your system.
    Taking your last question about SYSTEM_ON sleep into account, I suppose I can assume you meant SYSTEM_ON sleep - in which case it should not take too long for you to try out / utilize, since you can make use of the power management module to configure and use the SYSTEM_ON sleep, like shown in the BLE peripheral examples I mentioned.

    Please do not hesitate to ask if you should have any questions about this, or if you encounter any issues!

    Best regards,
    Karl

  • Taking your last question about SYSTEM_ON sleep into account, I suppose I can assume you meant SYSTEM_ON sleep - in which case it should not take too long for you to try out / utilize, since you can make use of the power management module to configure and use the SYSTEM_ON sleep, like shown in the BLE peripheral examples I mentioned.

    Hi Karl,

    I want to know which example you referred to in the BLE peripherals examples list.

    Best,

    Gaosheng

  • Hello Gaosheng,

    You could take a look at the BLE UART peripheral example to see SYSTEM_ON sleep demonstrated. Please see how the idle_state_handle function enters SYSTEM_ON sleep when no other jobs needs doing.

    Best regards,
    Karl

  • Hi Karl,

    I am very grateful for your help! It is really kind of you!

    Best regards,

    Gaosheng

  • lgs said:
    I am very grateful for your help! It is really kind of you!

    I am happy to hear you say that, Gaosheng!

    Please do not hesitate to open another ticket if you should encounter any other issues or questions in the future.

    Good luck with your development! 

    Best regards,
    Karl

Reply
  • lgs said:
    I am very grateful for your help! It is really kind of you!

    I am happy to hear you say that, Gaosheng!

    Please do not hesitate to open another ticket if you should encounter any other issues or questions in the future.

    Good luck with your development! 

    Best regards,
    Karl

Children
No Data
Related