Hi DA TEAM,
As I Modified the Sleep Mode Example code "ble_app_sleepmod" like as below, by using toggling a Button (SW3).
1)By default Sleep should be off,(BLE Device should be in advertising mode)
2)enable the sleep mode by Pressing SW3(button on Pro EVKT)
3)wake up the BLE core by using wake-up timer through SW3(after wake up BLE Device should be in advertising mode).
第一次这个步骤工作好。
Current behavior : I am trying to pressing SW3 continuously(next 2nd and every), But after the 2nd step , WKUP_QUADEC_Handler is called before pressing SW3.
Expected behavior: BLE core going to sleep or wake up only after pressing SW3 .
Kindly find the code and give your suggestion regrading this ASAP.
Note:Pro DA14580 EVKT-P_VB with SDK5.0.4
Device:
Hi GAK,
Could you please clarify what you mean with the “next 2nd和每一个”?如果我可以理解正确地摇来摇去m what you mention, your device be default start advertising (step 1), and if the button is pressed, stops advertising and it goes into sleep mode (step 2). Both step 1 and step 2 are fully functional, is that correct? But if you are pressing continuously the button in the step 2, the device enters the sleep mode but the WKUP controller is triggered? Could you please provide me the configurations in step 2 and 3? Something is triggering the wake the controller up and the DA1580 wakes up.
Thanks, PM_Dialog
Hi Team,
your device be default start advertising (step 1), and if the button is pressed, stops advertising and it goes into sleep mode (step 2). Both step 1 and step 2 are fully functional, is that correct? But if you are pressing continuously the button in the step 2, the device enters the sleep mode but the WKUP controller is triggered?>>>>>
Yes ,Exactly .
Kindly find the attached configuration.
Pls provide you support ASAP.
Hi GAK,
Something is getting wrong with the interrupts and when wakes up the GPIO interrupt is triggered as well, so your application code returns to step2. Let me ask you something first. In the user_app_adv_start(), why are you still using the app_easy_timer() timer? Upon the timer expiration the adv_data_update_timer_cb() will be triggered. I am not aware if this is your whole project, but in ble_app_sleemode example of the sdk, when the adv_data_update_timer_cb() the advertising is going to be stopped. I am trying to test you code and create a short demo for you. I will get back to you shortly. Both the WKUP and GPIO interrupts should be active low, correct?
Thanks, PM_Dialog
HI Team,
Kindly find the following inline replay,
why are you still using the app_easy_timer() timer? Upon the timer expiration the adv_data_update_timer_cb() will be triggered<<<<< I just follow the what ever DA gives in Example "ble_app_sleepmode" Project of SDK 5.0.4.
I am not aware if this is your whole project,<<<<<<<<<<<<<< I want to control the DA14580 entering Sleep and wake Up by interrupts .
Both the WKUP and GPIO interrupts should be active low, correct? <<<<<<<< I am using SW3 for generate an interrupts .So ,Its correct(pressing SW3 )
Kindly provide your support ASAP.
Thanks
Hi GAK,
I created a short dame code demonstrating how to use the SW3 in order to stop advertising and then wake up. I use only the wake-up controller and not the IRQ, because if you are using any of the sleep modes the IRQ will not be detected. Please find attached the configurations of the wake-up controller. The wkup_flag should be stored into the retention RAM in order to retain the value when going to sleep. Except from the configurations of the wake-up controller you should do the following modifications in the ble_app_sleepmode example of the SDK:
All the other should be as in default ble_app_sleepmode example of the SDK.
Thanks, PM_Dialog
Hi Team,
Thanks for the Demo code.
But what is our real expectation is we should use the GPIO IRQ for enter the DA14580 to Sleep .
So can you please give a example for GPIO act as IRQ at BLE
Hi GAK,
If you are using extended sleep mode between the advertising intervals, you can only detect the interrupt through the wake up controller. Is there any specific reason you want to use the IRQ and not the wake up controller?
Thanks, PM_Dialog
Hi Team,
I am try to use a IRQ for put the DA14580 to SLEEP.
And Not for wake up .
Expected flow:
1)By default Sleep should be off,(BLE Device should be in advertising mode)
2)enable the sleep mode by Pressing SW3(button on Pro EVKT)===========> by Using IRQ
3)wake up the BLE core by using wake-up timer through SW3(after wake up BLE Device should be in advertising mode) ===========> by using wake up controller
Thanks,
Hi GAK,
Apologies for the delay. DO you have any specific reason to use the IRQ for step #2? The device enters the sleep mode between the connection intervals, so you might miss the interrupt. Why don’t you implement it with the wake-up controller as I suggested you?
Thanks, PM_Dialog
Hi Team,
Thanks for yourreplay.
We are using DA14580 "ble_app_peripheral" project in our product(sensor related product which is used in Helath care domine)
So we are planing tomergethe sleep mode"ble_app_sleepmode""project to currentworking"ble_app_peripheral" project.
Because of this, we要d not change any currentworking flowof "ble_app_peripheral"project and our product spcifiation also.
Ourplatform/productalready havingapin connection with DA14580through SPI ( only for FW flashing),UART (only RX and TX for data transfer)and GPIO (P0_1) Pin of DA14580.
This is aSystem on Chip product.So we cannot change any schmatic of our product.
And ourEXPECTATIONisreducethe systemPowerof our product .For this we are planing to put theDA14580 sleepwhileDisconnectthe DA14580by User(Central BLE).
Kindly provied you suport on this ASAP.
NOTE: we are implent this on ourside.butstill we are strugglingandnotachive thecurrent(I ) reduction in good maner(not nanoAmps).but In Sleep mode project is we can able to see the current reduction(nAmps).
Is it possible ,kindlyshare any demo of Sleep mode in "ble_app_peripheral" project?
Ifyes,Itvery helpfor usNow.
Thanks,
Hi GAK,
Could you please try to provide me more clarifications regarding your last question? What do you mean with the sleep mode in the ble-app_peripheral example? If you would like to enter the sleep mode between the advertising or connection intervals, you could use the either arch_set_deep_sleep() in case of deep sleep or arch_set_extended_sleep() in case of extended sleep in user_app_adv_start, as it is implemented in ble_app_sleepmode example of the SDK. Also, you should change the app_default_sleep_mode configuration in user_config.h header file.
Thanks, PM_Dialog
Hi Team,
Our ultimate goal is toreduced thesensor productcurrent(I).
In our entire product,DA14580 haveing 1mAmps current.So we want tooptimizethecurrentofour productthrough enteringDA14580 to "Extended sleep"mode.
What do you mean with the sleep mode in the ble-app_peripheral example?>>>>its mean,implementinga DA14580sleepfeature to "ble-app_peripheral" example.
you should change the app_default_sleep_mode configuration in user_config.h header file.>>> thisdoes notuse for our雷电竞官网登录. Bydefault, DAsleep要d beoff.
DA14580要d be in Sleep while DA14580 Disconnecting from User App. This is our requirement & we have used the "extended sleep" mode.
Hi GAK,
When you disconnect the DA14580 from a peer device, the user_app_disconnect() will be triggered. So, you will have to configure the DA14580 into the extended sleep mode inside this function.
Thanks, PM_Dialog