Hello,
could someone explain to me why -if(EXTI0Flag)- is optimized in level-03 in a different way when it is inside the while(1) or outside ?
(when outside everything works fine but inside the while, it´s always true, even when EXTI0Flag = 0)
volatile int8_t EXTI0Flag = 0; int main(void) { /* Juego de luces de inicio de programa - se ha cargado correctamente en elµC */ Test_Leds_Ini(); printf("Testing printf ....."); BUTTON_initialize(); while(1) { /* Infinite loop - only interruptions enabled */ if(EXTI0Flag) { delay_ms(500); EXTI0Flag = 0; led_OFF(GPIO_Pin_9); //Led Azul } } }
I am sorry, I can't reproduce this issue.
My settings: MDK-ARM V5.21 ARM::CMSIS 5.0.0-Beta2 Keil::STM32F4xx_DFP V2.9.0 MCBSTM32F400, Blinky example project OptLevel 0+3
Please create a support ticket and forward your settings together with the corresponding example project: www2.keil.com/.../silver
i´ve already sent it. i´ll post the feedback from ARM Silver