dg_configLATCH_WKUP_SOURCE not waking up the device!!!

⚠️
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
garzola
Offline
Last seen:2 months 3 days ago
加入:2018-07-23 13:21
dg_configLATCH_WKUP_SOURCE not waking up the device!!!

Hi ,

I enabled dg_configLATCH_WKUP_SOURCE because i need in my app multiple source events. I verified that if ths macro is enabled the wakeup from hibernation mode doesn't work. If I disable it instead it wakes the device....

我需要更多的终端请求……Is that a bug of SDK ?

thanks for your reply!

Marco

Device:
garzola
Offline
Last seen:2 months 3 days ago
加入:2018-07-23 13:21
Hi,

Hi,

I solved the issue. I guess it's a SDK bug. It misses the writing of a register WKUP_SELECT_Px_REG
below as i solved with my function.
could you confim this ? btw seems it works waking device from hibernation.

hw_wkup_init(NULL);
hw_wkup_configure_pin(HW_GPIO_PORT_3,HW_GPIO_PIN_1,true,HW_WKUP_PIN_STATE_LOW);
hw_wkup_enable_wakeup( HW_GPIO_PORT_3,HW_GPIO_PIN_1 ); <---- this is my fnc
hw_wkup_register_interrupt(wkup_handler, 1);

void hw_wkup_enable_wakeup(HW_GPIO_PORT port, HW_GPIO_PIN pin)
{
switch (port) {
case HW_GPIO_PORT_0:
WAKEUP->WKUP_SELECT_P0_REG |= (1 << pin);
break;
case HW_GPIO_PORT_1:
WAKEUP->WKUP_SELECT_P1_REG |= (1 << pin);
break;
case HW_GPIO_PORT_2:
WAKEUP->WKUP_SELECT_P2_REG |= (1 << pin);
break;
case HW_GPIO_PORT_3:
WAKEUP->WKUP_SELECT_P3_REG |= (1 << pin);
break;
case HW_GPIO_PORT_4:
WAKEUP->WKUP_SELECT_P4_REG |= (1 << pin);
break;
default:
ASSERT_WARNING(0);//Invalid argument
}
}

Thanks

Marco

PM_Dialog
Offline
Last seen:4 hours 6 min ago
工作人员
加入:2018-02-08 11:03
嗨garzola,

嗨garzola,

Could you please let me know if this fixed your issue? You should write the WKUP_SELECT_Px_REG.

Thanks, PM_Dialog

garzola
Offline
Last seen:2 months 3 days ago
加入:2018-07-23 13:21
yes it fixed my issue. Marco

yes it fixed my issue.

Marco