cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration is changed after system wakes up from Idle mode

steve4
Associate II
Posted on July 18, 2008 at 17:00

Configuration is changed after system wakes up from Idle mode

3 REPLIES 3
steve4
Associate II
Posted on May 17, 2011 at 09:54

Hello Mr/Ms,

Here I get issue regarding idle mode while I use STR12-SK demo board. My main function is as below:

int main()

{

#ifdef DEBUG

debug();

#endif

SysInit();

Clock_Configuration();

Delay(0x7ffff);

while(1)

{

/* Turn OFF leds */

GPIO_Write(GPIO3,0x00);

/* Insert delay */

Delay(0x7FFFF);

/* Turn ON leds */

GPIO_Write(GPIO3,0xFF);

/* Insert delay */

Delay(0x7FFFF);

while( GPIO_ReadBit(GPIO7, GPIO_Pin_5) == Bit_RESET)

{

LPMode_Idle_UART_Interrupt_Periph_OFF();

}

}

}

First, LEDs on GPIO3 keep flashing as normal.While I press B1, system goes to idle mode. However, when system wake up via UART0 interruption, the LEDs don't work. I suspect that the configuation is changed. The original code is an2633.zip under STR9 documentation. Does someone get similar isuue? Any suggestion and help will be appreciated deeply. Thanks.

Steve

amira1
Associate II
Posted on May 17, 2011 at 09:54

Hello steve6,

I tried a similar example and it works fine for me.

Please verify these points:

-Are you disabling the prefech-queue in idle mode like the application note code?

-Verify by measuring the current consumption if the device is waken up from idle mode or not?

If the device freezes, verify if you are respecting the idle mode entry timing (refer to the reference manual for more details about calculating this time)? The wake up interrupt shouldn’t happen in this time. The maximum time required by the application to enter Idle mode must be taken into account.

Waiting for your feefback.

With best regards,

mirou.

steve4
Associate II
Posted on May 17, 2011 at 09:54

Hello mirou,

I appreciate your suggestion deeply. The demo code works fine in machine now. The reason is that I use the function GPIO_DeInit(GPIO3) two times. One is used in the SysInit() and another is in the UART_Interrupt_Config(). Since the functionality of DPIO_DeInit(GPIO3) resets the content in register GPIO3_DIR. So the first configuration is erased by second function call.

Thanks again.

Best regards,

Steve

:)