XC2200 Sleep / Wakeup

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

cross mob
Not applicable
Hi,

I want to put the ECU in power save mode and wake up via LIN.

I have implemented fllowing code, the ECU is able to go into power save mode but is NOT able to wake up. Any idea if some nessesary setting is missed?

#define SCU_ESRCFG_VALUE \
(((l_u16)(((l_u16)2U) <<0U))| /* PC Port Input/Output Control for ESR pin \
* 2: Input not inverted, pull-up device */ \
((l_u16)(((l_u16)0U) <<4U)) | /* DFEN Digital Filter Enable \
* 0: Filter is bypassed, 1: Filter is used */ \
((l_u16)(((l_u16)2U) <<7U)) | /* SEDCON Synchronous Edge Detection Control \
* (AEDCON = 0) 0: No action, 1: rising, \
* 2: falling, 3: both edge(s) */ \
((l_u16)(((l_u16)0U) <<9U))) /* AEDCON Asynchronous Edge Detection Control \
* (SEDCON = 0) 0: No action, 1: rising, \
* 2: falling, 3: both edge(s) */

#define SCU_ESREXCON1_VALUE \
(((l_u16)(((l_u16)1U) <<0U))| /* ESR1 Pin Enable */ \
((l_u16)(((l_u16)1U) <<3U))) /* ESR1 Input 2 Enable (P10.0) Rx pin */ \


static void gotoSleep(void)
{

/* Configure wake up via ESR (external service request) */
/* Configure ESR1 */
SCU_ESRCFG1 = SCU_ESRCFG_VALUE;

/* configure additional ESR1 input P10.0 (Rx pin) */
SCU_ESREXCON1 = SCU_ESREXCON1_VALUE;

/* clear DMP_M ESR1 trap request flag
* from now on, trigger events will be handled by the SCU driver */
SCU_DMPMITCLR = 0x1000U;

/* Goto Sleep */
SCU_PLLCON0_VCOPWD = 1u;

}
0 Likes
0 Replies