Active mode to hibernate mode

⚠️
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.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
10 posts / 0 new
Last post
强大的
Offline
Last seen:6 months 1 week ago
Joined:2018-12-27 04:15
Active mode to hibernate mode

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:
PM_Dialog
Offline
Last seen:1天23小时前
Staff
Joined:2018-02-08 11:03
Hi powersquare,

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

强大的
Offline
Last seen:6 months 1 week ago
Joined:2018-12-27 04:15
Yes.

Yes.

PM_Dialog
Offline
Last seen:1天23小时前
Staff
Joined:2018-02-08 11:03
Hi powersquare,

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

强大的
Offline
Last seen:6 months 1 week ago
Joined:2018-12-27 04:15
Dear Dialog team,

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

马利

PM_Dialog
Offline
Last seen:1天23小时前
Staff
Joined:2018-02-08 11:03
Hi powersquare,

Hi powersquare,

Can you please attach the main.c file? I could not see it in the attachments.

Thanks, PM_Dialog

强大的
Offline
Last seen:6 months 1 week ago
Joined:2018-12-27 04:15
Dear Dialog team,

Dear Dialog team,

Can you share your email, I will send the source code to you.

Best regards

马利

PM_Dialog
Offline
Last seen:1天23小时前
Staff
Joined:2018-02-08 11:03
Hi powersquare,

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

强大的
Offline
Last seen:6 months 1 week ago
Joined:2018-12-27 04:15
Dear Dialog team,

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

马利

PM_Dialog
Offline
Last seen:1天23小时前
Staff
Joined:2018-02-08 11:03
Hi Malli,

Hi Malli,

我们将支持你私人channe支持l.

Thanks, PM_Dialog