Hello
我想使用需求方的项目(DSPS 5.150.2). I added one characteristic to control GPIO at DSPS original project.
I can check the gpio is changed when I change the value of the characteristic.
The problem is that 'BLE_WAKEUP_LP_Handler' is continuously called which is calling the 'periph_init' function so that the gpio's state goes back to default state right after changing by BLE.
Could give me some advice about this?
Keywords:
Device:
Hi Daekeun Yun,
The BLE_WAKEUP_LP_Handler is called after the wake-up, and as you have already mentioned this handler executes the periph_init, so the gpio configuration before sleep is lost. If you want to keep the GPIO configuration after waking-up, you should add a flag into the function that you toggle the LED, and then check this flag into the periph_int() and configure the GPIO with the previous state.
Thanks, PM_Dialog
Thank you for your reply.
Even if I disable the sleep mode, still periph_init is called continuously.
Is there any reason for this?
da1458x_config_basic.h
#undef CFG_MEM_MAP_EXT_SLEEP
#undef CFG_MEM_MAP_DEEP_SLEEP
Hi Daekeun Yun,
Be aware that the deep sleep mode is not supported from the DSPS reference design application code. Only the active and extended sleep mode is supported. The macros that you have posted are not related with enabling/disabling neither the extended nor the deep sleep mode. In case you want to change the sleep mode, you should configure theapp_default_sleep_modevalue with the proper variable into theuser_config.hheader file.
const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;
const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;
Thanks, PM_Dialog