Hardware:
Custom board using DA14683
SDK:
1.0.14.1081 (last updated in 2018, despite what the new renesas download link says)
Situation:
The DA14683 won't go into extended sleep mode.
I issue the "pm_set_sleep_mode(pm_mode_extended_sleep);" command but the sleep state does not change. The power consumption does not change. From what I can tell it never changes the sleep state.
Questions:
1) How should I go about troubleshooting what is keeping the sleep mode from running? How can I determine what is keeping the code from going into sleep mode?
2) Can you debug the sleep mode operation?
Thank you for the response.
I am doing as you noted above to try to put the device into permanent sleep. I call ble_gap_adv_stop(), wait for the handle_evt_gap_adv_completed, then call pm_sleep_mode_set(pm_mode_extended_sleep);
As I noted above, when I do that the code hangs in the hw_cpm_wait_rad_power_down() call in apply_wfi().
sys_power_mgr.c: apply_wfi()
/* * Make sure that Radio PD is powered down */ hw_cpm_wait_rad_power_down();
Hi Nathan,
The hw_cpm_wait_rad_power_down() checks if Radio PD is powered down by reading the SYS_STAT_REG[RAD_IS_DOWN] bitfield.
However, this bitfield is set by the HW automatically and as you can see from this DA14683 datasheet is read-only ( it's not writable).
Are you testing this on your custom board? If yes, this sounds like a HW issue...
Regards,
PM_renesas
Yes, I am testing on a custom DA14683 board. But, I can successfully run both the pxp_reporter and bms demos and both of those demos enter sleep mode successfully. I have confirmed the hardware is capable of sleeping. I would say my sleep issues are not caused by a hardware problem.
If I do the following commands, then I can successfully get through the hw_cpm_wait_rad_power_down() check, but there is still something wrong that is keeping the device from fully sleeping and waking up again successfully. It appears as though it's entering sleep, with the current being very low, but it's not responding to the wake up signal from the button.
ble_gap_adv_stop(); rwip_prevent_sleep_clear(0xFFFF); //clear all bits sleep_when_possible();
I'm still working on this.. more to come...
Can you please share the implementation of sleep_when_possible()?
And also step thought the code to indicate when the sleep aborts.
Panos
The sleep_when_possible() function is part of YOUR SDK. Check the ad_ble.c file.
Related to this: https://community.renesas.com/wireles-connectivity/f/bluetooth-low-energy/29291/da14683-troubleshooting-high-current-3-6ma-during-sleep
Turned out to be an issue with the touch screen controller chip. Resolved.