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

Wake up

I am advertising some data, my hardware is minimum and there are no external interrupts. 

1.  How do I wake up  after entering power save mode with  __WFE();  ? 

2. I also want to change the advertising interval, the default settings of advertisement is flooding my gateway aggregator 

Parents Reply Children
  • Hello,

    1.  How do I wake up  after entering power save mode with  __WFE();  ? 

    The CPU will wake up from this state whenever an event is generated. If you are advertising, the SoftDevice will generate events and wake up the CPU in time to meet its timing-critical deadlines, so you do not need to manually wake up the CPU before every advertising takes place - the SoftDevice takes care of this.

    2. I also want to change the advertising interval, the default settings of advertisement is flooding my gateway aggregator 

    The advertising interval is set as part of the initialization. Most of the BLE peripheral examples from the SDK sets this with their APP_ADV_INTERVAL define, which is later used in the configuration of the advertisements.

    consulting99 said:
    I don't see a way to adjust the Timer ,  say I want to wake up device after 1 minute , where do I specify this

    You may not specify the time in which the CPU will stay in __WFE exactly - the CPU will wake from __WFE as soon as an event is generated.
    What is the reason you would like it to wake at a particular interval?
    Normally, you would not have to time the wake ups of the CPU when you have a task-and-event system. You could then just have the CPU go to SYSTEM_ON sleep (__WFE) as the only operation of the main loop, and then use the events from the different peripherals to have the CPU be awake and ready when it needs to be, and in SYSTEM_ON sleep as soon as there is nothing else that needs doing.
    Most of our BLE examples demonstrate this behavior - calling only the idle_state_handler function in the main loop.

    Best regards,
    Karl

Related