Regarding the ble_app_sleepmode project, I have a few questions:
问题# 1:
Deep sleep is defined yet, when connected, extended sleep mode is enabled within user_app_connection
user_app_connection()
{
// Set extended sleep during connection
arch_set_extended_sleep();
}
然而,维eep sleep mode was defined earlier in the statements:
const static sleep_state_t app_default_sleep_mode = ARCH_DEEP_SLEEP_ON;
#undef CFG_MEM_MAP_EXT_SLEEP
#define CFG_MEM_MAP_DEEP_SLEEP
Can both sleep modes exist within the same project?
Question #2
Can both deep sleep and extended sleep operate even when using the SPI Flash? Or should they be run when using the OTP memory?
Thank you,
-Shawn
Device:
Hi Gerbers,
Yes, both sleep modes can coexist in the same project, but you will have to go with the memory configuration of the deep sleep. For the deep sleep is essential to use the OTP, since in every wake up the code is mirrored from the OTP to the sysram and the device continues from where it has gone to sleep. But you could use the deep sleep as a ultra low power mode and when the device wakes up to issue a reset in order for the bootloader run and load the fw from the flash (this scenario applies only to a device that would go in deep sleep only between the advertising events and not during the connection events, advertising events are not time critical, therefore a new fw download from the flash is acceptable, but if the device goes in deep sleep in-between the connection events you will have to keep the fw in the OTP, so that the mirroring and the connection event to occur at the predefined time, if not you will be loosing connections).
Thanks MT_dialog