Hello,
I have found sometime DA14680 will restart itself after pm_set_sleep_mode(pm_mode_hibernation). The way I implement it is that there is a button on the board, and if button is clicked, it will run pm_set_sleep_mode(pm_mode_hibernation).
I am using a cunstom board. Strangly whether or not DA14680 will retart itself dpendens on situations, as summarized below.
DA14680 enter hibernation andnotrestart cases:
--Afer suota_initial_flash_jtag_win program . In this case, after click button, it will stay in hibernate mode.
--Use J-link RTT viewer and do file->connect. It reset the board and after click button, it will stay in hibernate mode.
DA14680 enter hibernation and restart shortly after:
--After hardware restart(disconnect power supply and reconnect), if click button, DA14680 will restart itself and will not enter hibernate mode.
--After WKUP from hibernate mode, if click button, DA14680 also will restart itself and will not enter hibernate mode.
I am very confused how could this happen. Can you please give me some insights? Thank you very much!
Hi huiui,
Can I ask which is the version of the DA1468x? Is it the DA14680/681 or DA14682/3? Additionally, are you using your own application code?
Generality, in order to put the system into hibernation mode you should make sure that you don't have any activity with the flash, the peripherals etc. To do so, you should take care that:
When the device exits from hibernation mode or the hibernation fails, a COLD BOOT takes place, which means that the application code is executed from the scratch (like a hardware reset).
Please find below some steps in order to put the system into hibernation using ble_peripheral example of the SDK. The changes should be applied in the ble_peripheral_task.c file:
1.建立一个OS_TIMER()以阻止dvertising after 15 seconds:
2. Start the timer in ble_peripheral_task:
3. Upon the timer expiration, stop advertising. So that the handle_evt_gap_adv_completed() is triggered and the system will go into hibernation.
4. I don’t know which flash you are using, so make sure they you have the correct configuration.
Thanks, PM_Dialog