Dear Dialog team,
Thank you for your support.
我们有自定义董事会由14683制作。应用程序是基于BLE_PERITELAL项目。虽然一项任务从传感器读取数据,但是一旦连接,其他任务将数据发送到移动应用程序。
我们有2个传感器,RTC,闪光灯,3个LED,振动器连接到电路板。
Our application will be in active mode during system init. We would like to bring the board to hibernate mode, when the button is pressed for 5 seconds. We observed that board goes to hibernate mode some times, but not always.
We also observed that button interrupt is called always and the counter is incremened for button press for 5 seconds, but some process is blocking from the board to go to hibernate mode.
Can you help us to resolve the issue?
Best regards
马利
Device:
Hi powersquare,
Thanks for your question. I am working on your issue and I will get back to you shortly.
Can you please let me know if your question is related with this one?
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/button-press-5-sec-wakeup-sleep-mode
Thanks, PM_Dialog
Yes.
Hi powersquare,
Sorry but I am little bit confused between this ticket and the attached one. In the attached ticket, you had mentioned that you cannot get the callback function upon wake-up. According to this ticket, your issue is that you are not able to put the device in hibernation mode. In order to put the device in hibernation mode, you should use the pm_set_sleep_mode(pm_mode_hibernation). Be aware that hibernation mode is a special mode to be used for shipping the final product to market without draining the battery. This is what is used for shipping and storing the final product and I would not recommend you the hibernation for development or debugging scopes. If you have BLE activity or any other pending interrupts, the system will not be able to go into hibernation. So, can you please let me know about the procedure you follow in order to put into hibernation? Do you stop the BLE activity, sensor reading etc.?
Thanks, PM_Dialog
Dear Dialog team,
Thank you for your support.
We are trying to find out, which part of the code, is causing this issue.
We put all our code in comments (#if 0) and started testing the button issue with PCB.
请找到附加的main.c.pdf文件供您参考。
In this file, we put our code in comments (line numbers 569 to 584, 605 to 649, line number 588, 595). We have also put line numbers 586, 590, 591 and 593) into comments.
With this bare minimum code, we observed button works fine in the PCB.
Then we started removing comments one by one. Removed the comments in line numbers 586, 590, 591 and 593, which is below code:
---------------------------------------------------------------------------------------
ad_nvms_init();
//nvms_var = ad_nvms_open(NVMS_GENERIC_PART);
nvms_Binvar = ad_nvms_open(NVMS_BIN_PART);
os_assert(nvms_binvar);
Printf(“Flash Bin成功\ r \ n”);
--------------------------------------------------------------------------------------------
使用此代码,按钮无法正常工作。在上面的行中,我们初始化了闪光灯并打开了Bin分区。它的印刷消息“Flash Bin零件成功”。
We don't have APIs like ad_nvms_close () APIs to close partition, before putting the PCB into hibernation mode.
Please note that PCB is powered with battery.
Can you help us to resolve this issue. If above code works fine for the button, then we will start removing comments in our code to test further.
Please let us know for any clarifications.
Best regards
马利
Hi powersquare,
Can you please attach the main.c file? I could not see it in the attachments.
Thanks, PM_Dialog
Dear Dialog team,
Can you share your email, I will send the source code to you.
Best regards
马利
Hi powersquare,
Could you upload here some code snippets? Can you please make sure if you stop the ble activity and interacting with the sensor when putting the system into hibernation? You need to completely stop BLE activity before going into hibernate. Do you have a custom board, or you are using any of our DKs?
Thanks, PM_Dialog
Dear Dialog team,
我们使用14683的定制董事会。
Do you have any code snippets or example project to stop BLE activity. Currently we use BLE stop Advertising api to stop advertising. Do we need to stop any thing else in BLE.
We use pm set sleep mode to hibernation api to put the system to hibernation mode.
Can you help us, how to find, which process is blocking the system to go to hibernate mode.
Best regards
马利
Hi Malli,
我们将支持你私人channe支持l.
Thanks, PM_Dialog