DA1469x Sleep Mode Implementation - Needed Example
⚠️ Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
请看看pm_sleep_mode_set () API。This function should be used in order to set the device into her desired sleep mode. Would you like to stop advertising and put it in permanent sleep mode? If the device is advertising, the is will go into sleep mode between adverting intervals. All the SDK BLE examples configures the device into extended sleep mode.
I have tried that function but nor able to verify how it's going to bw work and also not able to understand which sleep mode should be use ??
Because my task is device should be in sleep mode until it's moved and i have configured wakeup controller like that based on interrupt. So, If device has moved it'll generate the interrupt through wakeup controller till that no task should in run. all task should be start after wakeup.
TheDA1469x Wake up controllerSW example is demonstrating similar functionality. Which SDK project are you using? Does the device advertise? If yes, you will have to stop adverting and put it in sleep mode. Please keep in mid that the device can go into sleep mode between advertising or connection intervals and wakes up automatically by the BLE timer.
Yes device is advertising i guess so i'm not able to verify that device in sleep mode or not . Beacuse my all default tasks as it's running after reset.
If you are interested in testing the sleep mode, I would recommend using the SDK examples.
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.
I am trying to say that in order to go into hibernation or deep sleep you should not have any BLE activity, so you should stop advertising and configure the device into sleep mode. If there pending interrupts, then the system will fail to hibernate. ‘
I have explained you how to stop advertising and then put the system into hibernation.
Please try to stop advertising in the ble_adv example, and configure it into sleep mode.
> > >以及如何验证它在睡眠模式?
You should have to measure the current consumption.
I have tried the way you explained to do for sleep mode and also wakeup i used wakeupcontroller for interrupt in my example. and i tried to measure current consuption but i'm not able to see any change if i'm changing sleep modes. it's showing same current for all modes.
and i guess it's not going into sleep mode at all.
Hi Zinal,
I would recommend you first checking theDA1469x Power Consumption TutorialandDA1469x Wake up controllerSW Example from the DA1469x support page.
NOTE : Changing the device selection from DA14580 to DA1469x in the initial post.
Thanks, PM_Dialog
Hello PM_Dialog,
Can i get demo example code which is putting device into sleep??
because not understanding sleep mode configuration.
Regards,
Zinal.
Hi Zinal,
请看看pm_sleep_mode_set () API。This function should be used in order to set the device into her desired sleep mode. Would you like to stop advertising and put it in permanent sleep mode? If the device is advertising, the is will go into sleep mode between adverting intervals. All the SDK BLE examples configures the device into extended sleep mode.
Thanks, PM_Dialog
Hello PM_Dialog,
I have tried that function but nor able to verify how it's going to bw work and also not able to understand which sleep mode should be use ??
Because my task is device should be in sleep mode until it's moved and i have configured wakeup controller like that based on interrupt. So, If device has moved it'll generate the interrupt through wakeup controller till that no task should in run. all task should be start after wakeup.
Thanks,
Zinal.
Hi Zinal,
TheDA1469x Wake up controllerSW example is demonstrating similar functionality. Which SDK project are you using? Does the device advertise? If yes, you will have to stop adverting and put it in sleep mode. Please keep in mid that the device can go into sleep mode between advertising or connection intervals and wakes up automatically by the BLE timer.
Thanks, PM_Dialog
Hello PM_Dialog,
I'm using WiRa_10.440.8.6 SDK for this project.
Yes device is advertising i guess so i'm not able to verify that device in sleep mode or not . Beacuse my all default tasks as it's running after reset.
how can we stop device advertising?
sorry.
Regards,
Zinal.
Hello PM_Dialog,
please respond beacuse it will be heplful for me.
How do I put my DA14695 device into deep sleep / Hibenration with use of freeRTOS ??
Thanks,
Zinal.
Hi Zinal,
If you are interested in testing the sleep mode, I would recommend using the SDK examples.
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.
Thanks, PM_Dialog
Hello PM_Dialog,
Sorry for inconvience but didn't understand what you are trying to say.
my question is how can i configure sleep mode deep/hibernation while external interrupt is not occured?
and also how can i verify it's in sleep mode?
Thanks,
Zinal.
Hi Zinal,
I am trying to say that in order to go into hibernation or deep sleep you should not have any BLE activity, so you should stop advertising and configure the device into sleep mode. If there pending interrupts, then the system will fail to hibernate. ‘
I have explained you how to stop advertising and then put the system into hibernation.
Please try to stop advertising in the ble_adv example, and configure it into sleep mode.
> > >以及如何验证它在睡眠模式?
You should have to measure the current consumption.
Please check the following exampels :
DA1469x Power Consumption Central
DA1469x Power Consumption Peripheral
DA1469x Power Consumption Tutorial
Thanks, PM_Dialog
Hello PM_Dialog,
I have tried the way you explained to do for sleep mode and also wakeup i used wakeupcontroller for interrupt in my example. and i tried to measure current consuption but i'm not able to see any change if i'm changing sleep modes. it's showing same current for all modes.
and i guess it's not going into sleep mode at all.
Thanks,
Zinal.