2008-07-18 08:00 AM
Configuration is changed after system wakes up from Idle mode
2011-05-17 12:54 AM
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. Steve2011-05-17 12:54 AM
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.2011-05-17 12:54 AM
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 :)