AnsweredAssumed Answered

STM32 STemWin and Interrupt Problem

Question asked by mete.ibrahim on Apr 10, 2015
Latest reply on Apr 10, 2015 by mete.ibrahim
 I'm using STM32F407ZGT6 with SSD1963 LCD controller and 800x480 TFT panel. I'm not using OS. It's working with STemWin. 
 But when I used any interrupt, code execution stops at somewhere in emWin. 
 I moved WM_Exec() (GUI refresh function) to a timer interrupt routine and I disabled the interrupt before and enabled 
 the interrupt after emWin functions.
 The code is working in this form.
 
 //Main loop
     while(1)
     {
                _Disable_Timer_Interrupt
          GUI_EndDialog(hWin, 0);               //Delete GUI DIALOG
                _Enable_Timer_Interrupt


          HAL_Delay(500);
          
                _Disable_Timer_Interrupt
          hWin = CreateFramewin();          //Draw GUI DIALOG
                _Enable_Timer_Interrupt


          HAL_Delay(500);
     }
          
 //Timer Interrupt Routine          
 void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
     {     
          if(htim->Instance == TIM13)     
          {
               HAL_GPIO_TogglePin(GPIOF, GPIO_PIN_8);
               WM_Exec();
          }     
     }


 I added EXTI and the code didn't work again. enable-disable interrupt before-after didn't work in this time.
 I added FREETOS and problem didn't change. 
 When I used any interrupt, code execution stops at somewhere in emWin. 
 Does anyone have any idea about this?

Outcomes