我目前正在基于ble_all_in_one示例开发示例应用程序。ble_all_in_one示例上的更改如下:
1。特性的变化服务< br / > 2。将自定义应用程序数据写入SPI flash。< br / > 3。
4,增加了一个调用.app_going_to_sleep的函数,该函数下拉GPIO接口,在自定义硬件上完全下电单板
问题声明
1。看起来电路板没有进入扩展睡眠模式,.app_going_to_sleep函数没有被调用。我们正在测量电路板所消耗的电压,它与在操作模式下所消耗的电压相同。 The test point is plotted in such a manner that if the power gets cut off from the board, the TP should be as low as 0.06V.
2. The board should go into power-cutoff mode after inactivity is detected.
What I tried
1. I tried following the Sleep mode tutorial provided by Dialog but still, I'm out of luck.
2. I tried to remove all the arch_force_active_mode() and arch_force_restore_sleep() calls from my code.
3. I tried to deregister the wakeup callback for the GPIO button using wkupct_disable_irq() function on peripheral disconnect.
4. Explicitly called arch_set_extended_sleep() function to put the board in low power mode.
If you need anymore details, feel free to contact me. Please guide me through your valuable insights for solving this problem.
Thanking you in advance
Regards
Dhruv Shah
我已经引用了ble_sleep_mode示例,但对于我的应用程序,它不能正常工作。
I have used following snippet to config interrupt,
static void app_button_press_cb(void)
{
arch_disable_sleep();
//arch_force_active_mode();PER_IS_DOWN) < br / > {< br / > periph_init (); < br / >} < / p > < p >如果(arch_ble_ext_wakeup_get ()) < br / > {< br / > arch_set_sleep_mode (app_default_sleep_mode); < br / > arch_ble_force_wakeup (); < br / > arch_ble_ext_wakeup_off (); < br / > app_easy_wakeup (); < br / >} < br / >} < / p > < p >空白app_button_enable (void) < br / > {< br / > app_easy_wakeup_set (app_wakeup_cb); < br / >wkupct_register_callback (app_button_press_cb); < br / > wkupct_enable_irq (WKUPCT_PIN_SELECT (GPIO_KEY_PORT GPIO_KEY_PIN) | WKUPCT_PIN_SELECT (GPIO_I2C_BUZZER_PORT ACCELEROMETER_INT) / /选择销(GPIO_PORT_1 GPIO_PIN_1) < br / > WKUPCT_PIN_POLARITY (GPIO_KEY_PORT、GPIO_KEY_PIN WKUPCT_PIN_POLARITY_LOW) | WKUPCT_PIN_POLARITY (GPIO_I2C_BUZZER_PORT,ACCELEROMETER_INT, WKUPCT_PIN_POLARITY_LOW), //极性低
1, // 1事件
40// debuncunctime = 0
}
void user_app_adv_undirect_complete(uint8_t status)
{
//禁止BLE和timer事件的唤醒。 Only external (GPIO) wakeup events can wakeup processor.
if (status == GAP_ERR_CANCELED)
{
user_app_adv_start();
// Configure wakeup button
app_button_enable();
}
}
Using this i am unable to generate interrupt and wake my device from sleep.
Some random behavior is happening, like only first time i am able to detect push button interrupt and if repeat for 2nd time fail to detect.
Same with sensor interrupt.
Please help me solve issue.
Thanks and Regards
Rohit