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;
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.
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();
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