wkupct wake up doesn't work

3 posts / 0 new
Last post
achao1104
Offline
Last seen:5 years 3 months ago
Master
加入:2015-12-24 10:56
wkupct wake up doesn't work

here is my code, I use a key p2_7, once the key is pressed, it didn't trigger an interrupt to the call back. can someone help?

wkupct_register_callback(wake_up_cb);
x100 wkupct_enable_irq (0, 0 x100 1 0);

Device:
achao1104
Offline
Last seen:5 years 3 months ago
Master
加入:2015-12-24 10:56
it my fault, I observed it is

it my fault, I observed it is working, but the new problem is that once I set it to sleep, it is waken up by the interrupt immediately, I have tried different combination of "uint16_t events_num, uint16_t deb_time", it has no effect.

set to sleep:
app_adv_data_update_timer_used = 0xFFFF;

app_easy_gap_advertise_stop();
arch_set_deep_sleep();
arch_ble_ext_wakeup_on();

wake up:

wkupct_register_callback(wake_up_cb);
wkupct_enable_irq(0x200, 0x200, 1, 0);

and in the callback , as below:
if(GetBits16(SYS_STAT_REG, PER_IS_DOWN))
periph_init();

arch_ble_force_wakeup();
arch_ble_ext_wakeup_off();

MT_dialog
Offline
Last seen:1 month 3 weeks ago
Staff
加入:2015-06-08 11:34
Hi achao1104,

Hi achao1104,

The development kit that you are using is a pro kit and you are using the p1_1 button in order to wake up the da ? What is the configuration of you button pin is it INPUT_PULLUP ? You can have a look at the smart tag reference to check how the da is properly awake from an external interrupt, check the app_button_press_cb() function.

Thanks MT_dialog