Hello,
my application needs periodic wake ups at the exact time. I have set up a periodic timer through the DPM manager config callback. The problem is that while there is no wi-fi connection(Abnoraml DPM) the timer stops working. There are no wake-ups by the timer anymore. Is there any solution to make it run even in the Abnormal DPM mode?
rtc_timeout (tid:5) [timer1_callback] Called by timer1... !!! No selected network !!! rtc_timeout (tid:5) [timer1_callback] Called by timer1... !!! No selected network !!! >> Abnormal DPM(1) operation after 1 second. Wakeup source is 0x82 System Mode : Station Only (0) >>> Start DA16X Supplicant ... >>> DA16x Supp Ver2.7 - 2022_03 >>> Wi-Fi mode : b/g/n -> b/g (for DPM) >>> MAC address (sta0) : d4:3d:39:10:ec:6a >>> sta0 interface add OK >>> Start STA mode... [tcp_server_dpm_sample] Start TCP Server Sample [tcp_server_dpm_sample_load_server_info] TCP Server Information(10190) [tcp_server_dpm_sample_init_callback] Boot initialization >>> Hello World #1 ( Non network dependent application ) !!! !!! No selected network !!! rtc_timeout (tid:5) [timer1_callback] Called by timer1... !!! No selected network !!! …
Hi HanKo,Thank you for posting your question online and for your interest in our Wi-Fi products.Yes, you can configure the DPM Manager to wake you up in abnormal sleep mode as well.You can set the sleep time in abnormal DPM by configuring the _user_defined_wakeup_interval.You must make sure you have defined the __USER_DPM_ABNORM_WU_INTERVAL__ macro on the config_generic_sdk.h file://----------------------- // DPM Features //----------------------- // // Enable/Disable DPM Abnormal wakeup User-timer // This values are used to define DPM abnormal wakeup interval time. // // Default values are defined in ~/library/libdpm.a // : const unsigned long long dpm_monitor_retry_interval[DPM_MON_RETRY_CNT] = { // ULLONG_MAX, // Initial value : ULLONG_MAX // 60, // 1st Wakeup // 60, // 2nd Wakeup : 0xdeadbeaf for no-wakeup // 60, // 3rd Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 4th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 5th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 6th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 7th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 8th Wakeup : 0xdeadbeaf for no-wakeup // 0xDEADBEAF // 9th Wakeup : 0xdeadbeaf for no-wakeup // }; // // When enable this feature, // user can set these values to any value they want // in ~/apps/da16200/get_started/src/user_main/system_start.c : // // : unsigned long long _user_defined_wakeup_interval[DPM_MON_RETRY_CNT] = { // ULLONG_MAX, // Initial value : ULLONG_MAX // 60, // 1st Wakeup // 60, // 2nd Wakeup : 0xdeadbeaf for no-wakeup // 60, // 3rd Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 4th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 5th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 6th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 7th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 8th Wakeup : 0xdeadbeaf for no-wakeup // 0xDEADBEAF // 9th Wakeup : 0xdeadbeaf for no-wakeup // }; #define __USER_DPM_ABNORM_WU_INTERVAL__Then you can find the appropriate function to configure this variable on the system_start.c file:/* * Format of dpm abnormal wakeup interval * * value allowed for wakeup interval * 1 : mininum * 0x1FFFFF : maximum, 24 days * 0xDEADBEAF : no wakeup * wrong value : < 1 or > 0x1FFFFF, set to 3600 sec (default) * * Example: * unsigned long long _user_defined_wakeup_interval[]; * { * ULLONG_MAX, // Initial value : ULLONG_MAX * 10, 10, 10, 10, 10, * 60, * 3600, * 3600, * 3600 * 24 * } */ unsigned long long _user_defined_wakeup_interval[DPM_MON_RETRY_CNT] = { ULLONG_MAX, // Initial value : ULLONG_MAX 60, // 1st Wakeup 60, // 2nd Wakeup : 0xdeadbeaf for no-wakeup 60, // 3rd Wakeup : 0xdeadbeaf for no-wakeup 60 * 30, // 4th Wakeup : 0xdeadbeaf for no-wakeup 60 * 30, // 5th Wakeup : 0xdeadbeaf for no-wakeup 60 * 30, // 6th Wakeup : 0xdeadbeaf for no-wakeup 60 * 60, // 7th Wakeup : 0xdeadbeaf for no-wakeup 60 * 60, // 8th Wakeup : 0xdeadbeaf for no-wakeup 0xDEADBEAF // 9th Wakeup : 0xdeadbeaf for no-wakeup }; static void set_dpm_abnorm_user_wakeup_interval(void) { #if defined ( __USER_DPM_ABNORM_WU_INTERVAL__ ) dpm_abnorm_user_wakeup_interval = (unsigned long long *)_user_defined_wakeup_interval; #endif // __USER_DPM_ABNORM_WU_INTERVAL__ }Which SDK version are you using?Kind Regards,OV_Renesas
//----------------------- // DPM Features //----------------------- // // Enable/Disable DPM Abnormal wakeup User-timer // This values are used to define DPM abnormal wakeup interval time. // // Default values are defined in ~/library/libdpm.a // : const unsigned long long dpm_monitor_retry_interval[DPM_MON_RETRY_CNT] = { // ULLONG_MAX, // Initial value : ULLONG_MAX // 60, // 1st Wakeup // 60, // 2nd Wakeup : 0xdeadbeaf for no-wakeup // 60, // 3rd Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 4th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 5th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 6th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 7th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 8th Wakeup : 0xdeadbeaf for no-wakeup // 0xDEADBEAF // 9th Wakeup : 0xdeadbeaf for no-wakeup // }; // // When enable this feature, // user can set these values to any value they want // in ~/apps/da16200/get_started/src/user_main/system_start.c : // // : unsigned long long _user_defined_wakeup_interval[DPM_MON_RETRY_CNT] = { // ULLONG_MAX, // Initial value : ULLONG_MAX // 60, // 1st Wakeup // 60, // 2nd Wakeup : 0xdeadbeaf for no-wakeup // 60, // 3rd Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 4th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 5th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 30, // 6th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 7th Wakeup : 0xdeadbeaf for no-wakeup // 60 * 60, // 8th Wakeup : 0xdeadbeaf for no-wakeup // 0xDEADBEAF // 9th Wakeup : 0xdeadbeaf for no-wakeup // }; #define __USER_DPM_ABNORM_WU_INTERVAL__
/* * Format of dpm abnormal wakeup interval * * value allowed for wakeup interval * 1 : mininum * 0x1FFFFF : maximum, 24 days * 0xDEADBEAF : no wakeup * wrong value : < 1 or > 0x1FFFFF, set to 3600 sec (default) * * Example: * unsigned long long _user_defined_wakeup_interval[]; * { * ULLONG_MAX, // Initial value : ULLONG_MAX * 10, 10, 10, 10, 10, * 60, * 3600, * 3600, * 3600 * 24 * } */ unsigned long long _user_defined_wakeup_interval[DPM_MON_RETRY_CNT] = { ULLONG_MAX, // Initial value : ULLONG_MAX 60, // 1st Wakeup 60, // 2nd Wakeup : 0xdeadbeaf for no-wakeup 60, // 3rd Wakeup : 0xdeadbeaf for no-wakeup 60 * 30, // 4th Wakeup : 0xdeadbeaf for no-wakeup 60 * 30, // 5th Wakeup : 0xdeadbeaf for no-wakeup 60 * 30, // 6th Wakeup : 0xdeadbeaf for no-wakeup 60 * 60, // 7th Wakeup : 0xdeadbeaf for no-wakeup 60 * 60, // 8th Wakeup : 0xdeadbeaf for no-wakeup 0xDEADBEAF // 9th Wakeup : 0xdeadbeaf for no-wakeup }; static void set_dpm_abnorm_user_wakeup_interval(void) { #if defined ( __USER_DPM_ABNORM_WU_INTERVAL__ ) dpm_abnorm_user_wakeup_interval = (unsigned long long *)_user_defined_wakeup_interval; #endif // __USER_DPM_ABNORM_WU_INTERVAL__ }