# HG changeset patch # User Mychaela Falconia # Date 1547334186 0 # Node ID b24d42baa30d8a62c674a850360d4b789bda2ba6 # Parent 855b3c5bb4b5ef5cfd2c0e30a297fb8cdf3768b1 BIG_SMALL_SLEEP mode implemented diff -r 855b3c5bb4b5 -r b24d42baa30d src/cs/layer1/cfile/l1_pwmgr.c --- a/src/cs/layer1/cfile/l1_pwmgr.c Sat Jan 12 22:53:46 2019 +0000 +++ b/src/cs/layer1/cfile/l1_pwmgr.c Sat Jan 12 23:03:06 2019 +0000 @@ -955,10 +955,12 @@ why_big_sleep = BIG_SLEEP_DUE_TO_DSP_TRACES; } } - if (l1s.pw_mgr.mode_authorized == BIG_SLEEP) + if (l1s.pw_mgr.mode_authorized == BIG_SLEEP || + l1s.pw_mgr.mode_authorized == BIG_SMALL_SLEEP) why_big_sleep = BIG_SLEEP_DUE_TO_SLEEP_MODE; if ( ((l1s.pw_mgr.mode_authorized == BIG_SLEEP) && (sleep_mode >= FRAME_STOP)) || + ((l1s.pw_mgr.mode_authorized == BIG_SMALL_SLEEP) && (sleep_mode >= FRAME_STOP)) || ((l1s.pw_mgr.mode_authorized >= DEEP_SLEEP) && (sleep_mode == FRAME_STOP)) ) l1s.pw_mgr.sleep_performed = FRAME_STOP; diff -r 855b3c5bb4b5 -r b24d42baa30d src/cs/layer1/cfile/l1_small.c --- a/src/cs/layer1/cfile/l1_small.c Sat Jan 12 22:53:46 2019 +0000 +++ b/src/cs/layer1/cfile/l1_small.c Sat Jan 12 23:03:06 2019 +0000 @@ -231,9 +231,10 @@ */ asm(" .def _switch_PWR_MNGT "); asm(" .def _mode_authorized "); -asm("SMALL_SLEEP .equ 01h "); -asm("ALL_SLEEP .equ 04h "); -asm("PWR_MNGT .equ 01h "); +asm("SMALL_SLEEP .equ 01h "); +asm("ALL_SLEEP .equ 04h "); +asm("BIG_SMALL_SLEEP .equ 05h "); +asm("PWR_MNGT .equ 01h "); #if (OP_L1_STANDALONE == 0) // This code log the number of time the Small sleep // function has been invoked @@ -267,6 +268,8 @@ asm(" cmp r1,#SMALL_SLEEP "); // take the current value of the register asm(" beq Small_sleep_ok "); asm(" cmp r1,#ALL_SLEEP "); // take the current value of the register +asm(" beq Small_sleep_ok "); +asm(" cmp r1,#BIG_SMALL_SLEEP "); asm(" bne End_small_sleep "); asm("Small_sleep_ok "); diff -r 855b3c5bb4b5 -r b24d42baa30d src/cs/layer1/include/l1_const.h --- a/src/cs/layer1/include/l1_const.h Sat Jan 12 22:53:46 2019 +0000 +++ b/src/cs/layer1/include/l1_const.h Sat Jan 12 23:03:06 2019 +0000 @@ -65,6 +65,7 @@ #define BIG_SLEEP 02 // ------ + BIG + ------ #define DEEP_SLEEP 03 // ------ + BIG + DEEP #define ALL_SLEEP 04 // SMALL + BIG + DEEP +#define BIG_SMALL_SLEEP 05 // SMALL + BIG + ------ // GAUGING SAMPLES #define SIZE_HIST 10 diff -r 855b3c5bb4b5 -r b24d42baa30d src/cs/services/cst/cst_exts.c --- a/src/cs/services/cst/cst_exts.c Sat Jan 12 22:53:46 2019 +0000 +++ b/src/cs/services/cst/cst_exts.c Sat Jan 12 23:03:06 2019 +0000 @@ -650,9 +650,10 @@ * 2 -> BIG_SLEEP * 3 -> DEEP_SLEEP * 4 -> ALL_SLEEP + * 5 -> BIG_SMALL_SLEEP */ - if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 4)) + if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 5)) { power_down_config ((UBYTE) (*cmd - '0'), UWIRE_CLK_CUT); return( AT_CMPL );