Skip to main content

Sleep Modes

4 months ago

Sleep Modes

Posted bySubramanyan95 points 1 reply
0 upvotes

Hi,

I am using DA14695 Dev Kit and WiRa SDK 10.440.8.6 using FreeRTOS.

I am implementing a solution to put device to sleep when there is no activitity and have the following questions.

1. Does the call "pm_sleep_mode_set(pm_mode_extended_sleep);" suspend the FreeRTOS tasks ?

2. If we need to reduce the power consumption during sleep, is there a FreeRTOS function that will put the Dialog in the correct sleep mode, suspend the tasks, stop the Bluetooth acitivity, etc ?

3. When I tested using the power profiler, I see that between Bluetooth advertising, the average current consumption is around 2.5mA. But, I am expecting current in microAmps. How do I achieve this ?

Can you give me any pointers or tutorials for power management ?

Thanks and Regards,

Subramanyan

4 months ago

PM_Dialog

Hi Subramanyan,

Thanks for your question online and apologies for the delay. The extended sleep is the default sleep mode. The device can go to sleep between advertising or connection intervals.

If pm_sleep_mode_set(pm_mode_extended_sleep), what you see in the Power Profiler is that the device is advertising and goes to extended sleep mode between the advertising intervals. You can measure the extended sleep currents by using markers from the Power Profiler, so you can measure between 2 advertising intervals.

The average power consumption is closely depended on the advertising intervals. If you are using bigger intervals, then the device will sleep more time so the average power consumption will be decreased.

In order to go into permanent sleep mode, the chip should stop adverting first. So, you can set-up a timer to stop adverting and then going to extended sleep mode

The ble_gap_adv_stop() should be used in order to stop advertising. If advertising is successfully stopped, the application will receive a BLE_EVT_GAP_ADV_COMPLETED with status set to BLE_ERROR_CANCELED. So, you should setup a timer and stop advertising after a predefined amount of time.

Please refer to ble_adv example of the SDK and see how the BLE_EVT_GAP_CONNECTED and handle_evt_gap_connected are handled in the for(;;) loop. You should do the same for the BLE_EVT_GAP_ADV_COMPLETED.

static void handle_evt_gap_adv_completed( ble_evt_gap_adv_completed_t *evt) { pm_sleep_mode_set(pm_mode_extended_sleep); } case BLE_EVT_GAP_ADV_COMPLETED : handle_evt_gap_adv_completed((ble_evt_gap_pair_req_t *) hdr); break;

I would also recommend checking the following tutorials :

http://lpccs-docs.dialog-semiconductor.com/da1469x_power_measurement/index.html

Thanks, PM_Dialog