How to enter Stopover or Standby Mode for XC2000 series?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I am a student in Nanjing University of Technology in China and I am using XC2797 to make a controller for excavator.Now I am studying entering Stopover or Standby Mode. I have used "ScuConfigTool.exe" and generated "Scu_Cfg.h". Together with "Scu.c" "Scu.h" "Test.c". But I fond a problem:my compiler is Keil, there is some words I can not understand.
In "Scu_Cfg.h", I have "#define SCU_COMPILER (SCU_COMPILER_KEIL)", but in"Scu.h",there are

#if(SCU_COMPILER != SCU_COMPILER_KEIL)
#if(SCU_STANDBY_USED || SCU_STOPOVER_USED)
****
/* type for wake-up timer configuration */
typedef struct
{
uint16 Interval; /* Timer interval, 0...65535 */
uint8 Autostop; /* Timer behavior on trigger:
* 0 = continue (Interval = period for wake-up events,
* only for base line or higher)
* 1 = stop (Interval = power-down time) */
uint8 Divider; /* Divider (written to CLKDIV), only for base line or higher
* 0...7, will be limited to SCU_CLKDIV_MAX */
} Scu_TimerType;

/* type for power-saving configuration */
typedef struct
{
uint8 Mode; /* power-saving mode:
* 0 = normal stop-over,
* 1 = stop-over with crystal on,
* 2 = normal standby,
* 3 = standby with FSM */
uint8 Channels; /* combination of WUT and ESR wake-up channels:
* Bit0 = WUT, Bit1...3 = ESR0...2, Bit 4 = STM */
Scu_TimerType Timer; /* WUT configuration, only relevant if timer is specified
* in Channels */
} Scu_PowerSavingCfgType;
****
#endif /* (SCU_STANDBY_USED || SCU_STOPOVER_USED) */
#endif /* (SCU_COMPILER != SCU_COMPILER_KEIL) */


And in "Scu.c",there are:

#if(SCU_STANDBY_USED || SCU_STOPOVER_USED)
static Scu_PowerSavingCfgType PowerSavingCfg;
#endif

When used "PowerSavingCfg", there will be waring and error such as:

power\Test.c(165): warning C34: 'PowerSavingCfg': missing declaration specifiers
power\Test.c(165): error C42: 'PowerSavingCfg': not in formal parameter list
*****

I want to know how to slove the problem??
0 Likes
0 Replies