How to wake up DA14580 device

19 posts / 0 new
Last post
asmaitha
Offline
Last seen:5 years 3 months ago
Expert
Joined:2014-11-20 08:45
How to wake up DA14580 device

Hello All,

How to wake up DA14580 device Synchronously via the BLE timer in order to serve the BLE events.

Thanks

Keywords:
JE_Dialog
Offline
Last seen:1 month 1 day ago
Staff
Joined:2013-12-05 14:02
Hello Asmaitha, have you read

Hello Asmaitha, have you read the apps note on how to configure sleep mode either synchronously (BLE Timer) or asynchronously (interrupt) ?

http://support.dialog-semiconductor.com/um-b-006-user-manual-sleep-mode-configuration

This is quite a comprehensive apps note, and is the best place to start.

BR JE_Dialog

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hello JE_Dialog,

Hello JE_Dialog,

I'd wonder how to identify the wake up events,such as two short pulse to wake up the system asynchronous.Thank you!

BR Young

vishnusudhan
Offline
Last seen:2 years 5 months ago
Joined:2018-10-01 10:58
Hi DATeam,

Hi DATeam,

I couldn't able to download this document .Can you suggest how to download ?

Thanks,
vishnu

asmaitha
Offline
Last seen:5 years 3 months ago
Expert
Joined:2014-11-20 08:45
Hello JE_Dialog,

Hello JE_Dialog,
Thanks a lot for replying back.
I have gone through the document.
But even after disabling both Extended and deep sleep mode in da14580_config.h file as below :
#undef CFG_EXT_SLEEP
#undef CFG_DEEP_SLEEP

We are unable to see that the device is awake always and also it's not advertising continuously.

Thanks,
asmaitha

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hello JE_Dialog,

Hello JE_Dialog,

I'd wonder how to identify the wake up events,such as two short pulse to wake up the system asynchronous.Thank you!

BR Young

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi young_dialog,

Hi young_dialog,

我不让你的问题,请澄清吗?You can use the wakeup controller and set it up using multiple pins, if that is what you mean.

Thanks MT_dialog

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

Thanks for your attention,I mean how to identify this pins which wake up the system,such as one pin to send data and another to perform adc.I use the method to achieve it accroding to the

wucpt_quadec.c doucment.But I find function 'wkupct_register_callback()' can only register one callback function.So when any pin active,they will come to the same callback and there is no

寄存器指示销活动。这是我的米ethod right?Is it any suggestion?

BR,
Young

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi young_dialog,

Hi young_dialog,

Yes thats right, you can declare many wakeup pins, but you have only one callback, if you want to identify from which pin you got the interrupt you can try to read the status of the pin after getting the interrupt and check which of your pins are high or low.

Thanks MT_dialog

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

When the interrupts result from the short pulse such as 5us high pulse,it is difficult to identify it when read the status of the pin.

I also wonder how to retain the pin state when system enters the Extended Sleep mode,thank you!

BR,
Young

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi young_dialog,

Hi young_dialog,

There is no other way doing this, you can either read your pins or you can try to set the GPIO IRQs for the connected pins if the sources connected matches the available IRQs. You dont have to do anything explictly in order for the 580 to retain the state of the pins, when it falls to sleep, while you are in sleep mode the state will be retained, but you will have to keep the state of your pins since when the 580 wakes up, the periph_init() will run and your pins are going to be reconfigured.

Thanks MT_dialog

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

I try to use the GPIO IRQs to wake up the system periodically and it work well on active mode and doesn't work on extended sleep mode.By the way,the interrupt is triggered by the pulse

generating from the ADC chip with period of 4ms.Is it too short to wake up the system?Any suggestion?

Thank you!

BR,

Young

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

As we know,DA14580 can wake up by Wakeup Timer and Quadrature Decoder when in Extended or Deep sleep mode. I wonder how to wake up when only GPIO IRQs is used?Thank you!

BR,

Young

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi young_dialog,

Hi young_dialog,

I dont think that 4ms is too short to wake up the system and trigger the interrupt, have you try to properly configure the debouncing parameter on the wakeup setting and at the GPIO IRQ ? Cause i tried with a 4ms pulse and i could wakeup the system and trigger the IRQ.

Regarding the waking up, you can't wake up the system via GPIO IRQs only the wakeup timer and the Quadrature can wake it up.

Thanks MT_dialog

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

Yes,4ms is not too short to wake up the system and trigger the interrupt if I wake up the system and set the GPIO IRQs. That is what I want! Thank you!

BR,

Young

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

How to change the sleep mode? Our usage scene is : Extended sleep mode when advertising, Active/Idle mode when connected, return to Extended sleep mode after disconnection and

re-advertising. I try to use the API 'app_force_active_mode() with app_restore_sleep_mode() ' or 'arch_disable_sleep() with arch_set_sleep_mode()' to change sleep mode when connected and

disconnecting, the phenomenon is the mode is changed to Active mode successfully when connected but could not be changed to Extended sleep mode or restart advertising after

disconnection. Any suggestion?Thank you!

BR,

Young

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi young_dialog,

Hi young_dialog,

You can use the following functions when you want to switch between the sleep modes:

arch_disable_sleep() : the device will be active

arch_set_extended_sleep(): the device will swicth to extended sleep mode

You can invoke the above functions when connected and disconnected from the central device by invoking (arch_disable_sleep in the user_app_connection callback and arch_set_extended_sleep in the user_app_disconnect) its the same with the arch_set_sleep_mode() with the proper parameter. In order to start advertising again after disconnection you will have to invoke arch_set_extended_sleep() and user_app_adv_start() in the user_app_disconnect in order to set the device in exteded sleep and start advertising again.

Also please dont post a different question under the same thread, you can always create a new thread.

Thanks MT_dialog

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

I am sorry about that, but it's strange that I have no access to create a new thread! What's the matter? I have not enough permission?

BR,

Young

young_dialog
Offline
Last seen:3 years 9 months ago
Joined:2016-05-10 07:14
Hi MT_dialog,

Hi MT_dialog,

I find the way to create new thread now,thank you!

BR,

Young