- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there an API call available that can be used to perform a soft reset?
I tried to use bleappfwu_watchdogExpired() from bleappfwu.h, but it is not work in BCM20736S.
however, it'sOK(success to reset) in the develop board. and it is OK after OTA even if in BCM20736S.
After fail to enter the deepsleep mode, I try to force a software reset and ready to enter deepsleep again;
here's what I used to force a reset:
bleapputil_cpuIntDisable();
ble_trace0 (" bleapputil_cpuIntDisable");
bleapputils_delayUs(500);
bleappfwu_watchdogExpired(0);
ble_trace0(" bleappfwu_watchdogExpired");
here is the log information: After call bleappfwu_watchdogExpired(0); BCM20736S hung up, press key can wake up it.
09:59:18 - LEDPowerOnOff:0
09:59:18 TimersKilled
09:59:18 AppTimer(adv, conn) stopped: 1
09:59:18 noAdv
09:59:18 - app_enter_hidoff
09:59:18 - app_abort_hidoff
09:59:18 bleprofile_queryPowersave(POWEROFF): 00000001
09:59:18 bleprofile_queryPowersave(POWEROFF): 00000001
09:59:18 abortHidoff!!!
09:59:18 Stop Power Save
09:59:18 Fine Timer(50 ms, 20/sec)
09:59:18 Fine TImer tick 4
09:59:18 Normal Timer(1 s, 80 tick)
09:59:18 AppTimer(adv, conn) stopped: 1
09:59:18 BLE_high_un_adv:timer(0)
09:59:20 AppTimer(adv, conn) stopped: 1
09:59:20 noAdv
09:59:21 - _timer_1s
09:59:22 - _timer_1s
09:59:23 - _timer_1s
09:59:23 - bleapputil_cpuIntDisable
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bleappfwu_watchdogExpired(0) was the recommendation for soft reset. I noted that you are using a module. Did you take care of the crystal warm-up issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bleappfwu_watchdogExpired(0) was the recommendation for soft reset. I noted that you are using a module. Did you take care of the crystal warm-up issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Btta,
Think you for your reply!
Please refer to my test flow:
step_1:After power on 5s, BCM20736S enter the deepsleep auto, it's OK,
step_2:then press P0_key to wake it up, it's OK too,
step_3: BCM20736 enter the deep sleep again after 5s, it's fail. "app_abort_hidoff()" be called. then after 10s, I try to call bleappfwu_watchdogExpired(0) to force reset. Unfortunately, it's fail too.
During step_3, if I press P0_key before call bleappfwu_watchdogExpired(0); it can success to reset BCM20736,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exerting P0 is like power-on-reset. The fw should execute like what it has been designed. However after pressing P0 in step (2), it failed to enter deep sleep again. Perhaps you should try to debug this part first before we kick the watchdog. Does your deep sleep code look something like below:
ble_trace0("Entering Deep Sleep\n");
bleapputils_delayUs(500);
bleprofile_Discoverable(NO_DISCOVERABLE, NULL);
bleprofile_PrepareHidOff();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi btta,
You are right, now, I added below code before enter DeepSleep,
miaDriverConfig.delayAfterEnteringHidOffInUs = 0xffffffff;
intctl_ClrPendingInt(0xffffffff);
I had found It's very helpful to get into the DeepSleep,So far I haven't found any exceptions. I need not software reset.
My complete code is as follows
bleprofile_KillTimer();
bleprofile_Discoverable(NO_DISCOVERABLE, NULL);
bleapputils_delayUs(500);
miaDriverConfig.delayAfterEnteringHidOffInUs = 0xffffffff;
intctl_ClrPendingInt(0xffffffff);
bleprofile_PrepareHidOff();