This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

About reset during advertising

SDK: 15.3.0
Example: ble_app_multirole_lesc
Device: EYSHJNZWZ (nRF52832)

After calling "ble_advertising_start" to start advertising, call "sd_app_evt_wait" to transition to sleep.
Approximately 7 minutes after calling "sd_app_evt_wait", it appears to be reset.
Please tell me about this cause.


As a side note, I am using WDT.
This does not occur when WDT is disabled.
Therefore, we believe that the cause is WDT.
WDT is cleared when it is released from sleep.
However, after calling "sd_app_evt_wait", it was not woken from sleep.
Therefore, it is always in a sleep state.
I am setting the WDT as follows.
I think WDT is disabled during sleep.

Also, when "ble_advertising_start" is not called, this phenomenon does not occur.

Parents
  • Hi Takashina, 

    How did you feed the WDT ?  What was the reload value you used ? 

    Usually the WDT should be fed using a timer. I think the reason that WDT timer trigger a reset is because sd_app_evt_wait() will put the CPU to sleep and will not jump back to the application if there is no interrupt in the application. This mean, the CPU still wake up on softdevice activity (BLE activity) but it won't execute the WDT feeding code in the loop you have. This result that the WDT will still run when CPU is active (when there is BLE event) but it won't get fed. After a few minutes the WDT will timeout. 

    I would suggest to use a timer to feed the WDT. 
    Otherwise you can think of avoid using sd_app_evt_wait() but use these commands instead : 

    __WFE();

    __WFE();

    __SEV();

    This will allow the CPU to wakeup and execute the feeding WDT task on any CPU activity. 

  • >> Otherwise you can think of avoid using sd_app_evt_wait () but use these commands instead:
    >> __WFE ();
    >> __WFE ();
    >> __SEV ();
    >> This will allow the CPU to wakeup and execute the feeding WDT task on any CPU activity.

    I tried the above process.
    When the CPU wakes up, it also wakes up at the application level.
    As a result, the WDT clear process runs and the WDT reset phenomenon no longer occurs.
    Thank you for teaching me.
    However, I do not understand what "__WFE ()" and "__SEV ()" do.
    Can you tell us about these roles?

Reply
  • >> Otherwise you can think of avoid using sd_app_evt_wait () but use these commands instead:
    >> __WFE ();
    >> __WFE ();
    >> __SEV ();
    >> This will allow the CPU to wakeup and execute the feeding WDT task on any CPU activity.

    I tried the above process.
    When the CPU wakes up, it also wakes up at the application level.
    As a result, the WDT clear process runs and the WDT reset phenomenon no longer occurs.
    Thank you for teaching me.
    However, I do not understand what "__WFE ()" and "__SEV ()" do.
    Can you tell us about these roles?

Children
No Data