DA14585 doesn't wake up while external interrupt coming

⚠️
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.
4 posts / 0 new
Last post
stanley_yeh
Offline
Last seen:1 year 11 months ago
加入:2016-12-23 06:52
DA14585 doesn't wake up while external interrupt coming

Hi There,
I am using DA14585 with SDK 6.0.4.
My device connects to a acc sensor. Every 100ms, DA14585 will receive an external interrupt.
我也使交货tend sleep mode of DA14585.
I find that sometimes DA14585 will NOT wake up. Is it a bug?
Please check the image here:http://imgur.com/a/Zykxs
(I use a pin to show the status of DA14585. If the pin is high, it means DA14585 is not in sleep mode.)

I try to mark one line, "ext_wakeup_disable();", in the "arch_resume_from_sleep" function,
DA14585 will wake up normally on every interrupt coming. However, I am not sure the modification is feasible or not.
Could you please give me some suggestions?
Thanks a lot.

Device:
MHv_Dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2013-12-06 15:10
Hi,

Hi,

It is not cklear from your email, that you are using the wake-up timer, but this is your only option when you want to wake up using a GPIO. Please seehttps://support.dialog-semiconductor.com/system/files/restricted/UM-B-051_DA1458x_Software_Platform_Reference_1v2.pdffor details.

/MHv

stanley_yeh
Offline
Last seen:1 year 11 months ago
加入:2016-12-23 06:52
Now I understand clearly.

Now I understand clearly.
When DA14585 is sleeping and receiving an external interrupt. The function "ext_wakeup_cb" will be called.
After executing the function, DA14585 will go to sleep, so the callback function I set by using "GPIO_RegisterCallback" will not be executed sometimes.
My solution is to disable the sleep mode in "ext_wakeup_cb" function and restore sleep mode in "GPIO1_IRQ_Handler" function.
However, the console(UART2) and my external interrupts will use "arch_force_active_mode" to disable sleep mode.
The "arch_force_active_mode" function is NOT reliable!!! I think the function is only for console.
I totally modified the function.
Now, it works. I am really tired....Orz

MHv_Dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2013-12-06 15:10
Glad to hear that you got it

Glad to hear that you got it working :o) and I hope you will have a chance to rest.

/MHv