Questions about Sleep Mode -- Soft Switch connected with IO port

Learn MoreFAQsTutorials

7 posts / 0 new
Last post
猫王1991
Offline
Last seen:1 week 1 day ago
加入:2014-12-09 08:18
Questions about Sleep Mode -- Soft Switch connected with IO port

Dear All,

My question is about the change the hard switch as the reference design to the soft switch.

现在my setup: DA14583 IoT Sensor.
We used a hard switch as the reference design, which means that every time we cut off the power, the whole system stop working.
We would like to change the hard switch (connected with VBAT3V) to the soft switch, which means that the MCU is still working.
For example, we would like to connect a soft switch at P2_1 to control whether Bluetooth starts working or not. How can we do that?
Could you please give me some suggestion? Thanks!

Best Regards,
猫王

Device:
PM_Dialog
Offline
Last seen:12 hours 46 min ago
工作人员
加入:2018-02-08 11:03
Hi Elvis1991,

Hi Elvis1991,

Could you please explain further your question? What do you mean with the soft and the hard switch? Do you want to remove the switch from the IoT PCB and place a switch button? This requires handmade modification into the PCB. Be aware that this switch is used for powering on/off the chip, so if you remove it, you should think how you can power it on. Why do you want to add a switch to control whether Bluetooth starts working or not? Do you want to reduce the power consumption? If yes, you can use the sleep mode, so the device will go into sleep between advertising and connection intervals. Please, provide us more details in order to understand your implementation.

Thanks, PM_Dialog

猫王1991
Offline
Last seen:1 week 1 day ago
加入:2014-12-09 08:18
Hi PM_Dialog,

Hi PM_Dialog,

Thank you very much for your reply.
Yes. We would like to use "Sleep" and "Wakeup" to control the Bluetooth.
Here is the detailed description of my question:
Setup:

Software: We are using DA14583 IoT Sensor for the reference design and run the RAW Project.
Hardware: The original design to control the power is based on a switcher, which means that when the switcher is off, the MCU will stop to work.
However, for real application, we would like to change the original switcher design to "softly" control, by entering the extended sleep mode and disable advertising if the button is not pressed.

As a result, we would like to revise the original firmware to realize the “wake-up“” function.

Questions:

现在we would like to wake up the DA14583 and start advertising with the press of a button (Input P2_1). How can I do that in RAW Project?
Could you please some hints to me. Thank you very much!

Best Regards,
猫王

PM_Dialog
Offline
Last seen:12 hours 46 min ago
工作人员
加入:2018-02-08 11:03
Hi Elvis1991,

Hi Elvis1991,

In order to wake up your device with a button pressing, please check the ble_app_sleepmode example of the SDK (DA1458x_SDK\5.0.4\projects\target_apps\ble_examples\ble_app_sleepmode). This example demonstrates how to use the sleep mode API and change in runtime the sleep mode. Please read the Pillar 5 (Sleep Mode) of the DA1458x Software Developer’s Guide (UM-B-050) document in order to understand how exactly it works. It is strongly recommended to understand the SDK architecture and practice with the defaults examples of the SDK, so I suggest you to read the UM-B-050 and UM-B-051 documents from our portal page.

Regarding the switch button, be aware that the IoT hardware does not have any button, so how will you add a button in the P2_1?

Thanks, PM_Dialog

猫王1991
Offline
Last seen:1 week 1 day ago
加入:2014-12-09 08:18
Hi PM_Diaog,

Hi PM_Diaog,

Thanks for your explanation. We will redesign the schematic and PCB layout refer to IoT application. As a result, we need to revise the firmware to realize our function. Do you have similar application for our reference or give us some suggestion on how to revise the code based on the IoT SDK?

Best Regards,
猫王

PM_Dialog
Offline
Last seen:12 hours 46 min ago
工作人员
加入:2018-02-08 11:03
Hi Elvis1991,

Hi Elvis1991,

I highly recommend you to read the DA1458x Software Developer’s Guide (UM-B-050) user manual from our portal page. The Pillar 5 (sleep mode) BLE example application demonstrates how to use the sleep mode API and change in runtime the sleep mode. You are able to wake up the device by pressing a button. After the button press the device will start to advertise again for the predefined time. Please check the ble_app_sleepmode example of the SDK (DA1458x_SDK\5.0.4\projects\target_apps\ble_examples\ble_app_sleepmode). This example demonstrates the similar functionality that you want to implement into your design.

Regards, PM_Dialog

猫王1991
Offline
Last seen:1 week 1 day ago
加入:2014-12-09 08:18
Dear PM_Dialog,

Dear PM_Dialog,

好的。谢谢你的帮助!

Best Regards,
猫王