Hi All,
I'm currently working on the sample application based on ble_all_in_one example. The changes on top of the ble_all_in_one example are as follow
1. Changes in characteristics & services
2. Write custom application data to SPI flash.
3. Button event changes (We have registered a wakeup ISR for the same to detect short press and long press)
4, Added function to be called .app_going_to_sleep, that pulls down a GPIO interface which completely powers off the board on a custom hardware
Problem Statement
似乎电路板没有进入扩展的睡眠模式,而且.App_Goop_to_sleep函数未被调用。我们测量电路板消耗的电压,它与操作模式所消耗的电压相同。绘制测试点以这样的方式绘制,如果电源从电路板切断,则TP应低至0.06V。
2.检测不活动后,电路板应进入电源截止模式。
What I tried
1. I tried following the Sleep mode tutorial provided by Dialog but still, I'm out of luck.
2. I tried to remove all the arch_force_active_mode() and arch_force_restore_sleep() calls from my code.
3.我试图使用WKUPCT_DISABLE_IRQ()函数对GPIO按钮取消注册唤醒回调。
4.明确称为ARCH_SET_EXTEDDED_SLEEP()函数以将电路板放在低功率模式下。
If you need anymore details, feel free to contact me. Please guide me through your valuable insights for solving this problem.
Thanking you in advance
问候
dhruv shah
嗨dhruv11593,
I am working on your issue and I will get back to you as soon as possible.
谢谢,PM_DIALOG.
Hi PM_Dialog,
Looking forward to your response. If you need any technical help regarding the same, please do let me know
嗨dhruv11593,
Could you please let me know how you understand that your device isn’t going to extended sleep mode? I tried to replicate you problem, but in my side the .app_going_to_sleep callback function is always triggered before entering the extended sleep mode. Did you try to add a break point into your function that will executed since the .app_going_to_sleep is triggered and run your code with hot attaching the debugger?
谢谢,PM_DIALOG.
Hi PM_Dialog,
Thank you so much for putting efforts for recreating my test scenario on your end.
On our custom board to achieve longer battery life, we have a system trigger GPIO which keeps the system active until it is kept High and cuts off the voltage to the system when turned low. As soon as the board boot-up, we are configuring this GPIO to high in the pherip_init() function. In the .app_going_to_sleep callback function, we are pulling this GPIO low which cuts off the power supply to the SoC.
When the SoC is powered off, the ideal voltage on the test pads is somewhere around 0.01 to 0.03 V and when the system is active the voltage is the same as that of the battery's current capacity. If the .app_going_to_sleep callback is getting triggered, we should see a voltage drop from ~3 V to 0.01 V, which is never the case. We have measured the Voltage on the system after 1. 3. and 5 mins of ideal time but the board was still consuming power from the battery.
As far as my understanding goes, when doing step debug the board will always be in active mode. Please clarify if otherwise.
问候,
dhruv shah
嗨dhruv11593,
As I am able to understand from what you mentioned in your post, you have made some modifications into the ble_app_peripheral example of the SDK in order to implement your application. If you try to test the .app_going_to_sleep callback function using the default example of the SDK, as it is, could you please let me know that the callback getting triggered before going to sleep? Please, try to use some break points and run you code with hot attaching the debugger. Are you able to see that the code stops into the registered callback?
.app_ging_to_sleep回调函数从app_sleep_entry_proc(sleep_mode)调用;将其放入ARCH_GOTO_SLEEP(Sleep_Mode_t Current_sleep_mode)函数中。ARCH_GOTO_SLEEP()函数被调用为ARCH_MAIN.c文件中MAIN_FUNC()的无限循环的while(1)。请运行使用热连接调试器的代码,然后检查Sleep_Mode变量的值。如果在Arch.h标题文件中检查Sleep_mode_t枚举,您将看到Sleep_Mode变量的可能值。因此,如果使用扩展睡眠模式,Sleep_Mode应具有0x02值。此外,请检查ARCH_GOTO_SLEEP()函数是否触发。我从我的身边测试,.app_ging_to_sleep正在触发。
Furthermore, that the DA14583 goes into extended sleep mode between advertising and connection intervals. Could you please let me know about the power consumption of you board? If you are using the extended sleep mode, the app_default_sleep_mode value in the user_config.h header should be configured like that:
const static sleep_state_t app_default_sleep_mode = arch_ext_sleep_on;
谢谢,PM_DIALOG.