lpcware

TFT LCD Video Compare Interrupt is NOT working properly

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by emulund on Wed Dec 04 17:33:43 MST 2013
Hello All,

I Have my own custom build LPC1788 board.
i am able to make my TFT LCD 320x240 work with external SDRAM.
Everything works fine as expected.

But for some reason i need to use LCD's Vertical compare interrupt.
When i enabled it and if i use my IAR debugger to set break point on the ISR then it triggers the ISR.
But if i run without break point then it some time triggers for only once or twice but never again.
still My TFT LCD is displaying a steady nice picture without any problem.
my LCD's Horizontal,vertical sync & LCD DOT Clock  could be observerd on oscilloscope at the correct frequency and are very stable.
i am running the lpc1788 at 96Mhz.


My code to enable the vertical compare interrupt


volatile __no_init __READ_WRITE unsigned long ISER1 @ 0xE000E104;

   LCD_INTMSK = (1 << 3); //Enable Vertical compare interrupt
   ISER1 |= (1 << 5);   //Enable LCD Controller's Interrupt
//Enable LCD Controller
   LCD_CTRL = (6 << 1) | (1 << 5) | (1 << 11);
   LCD_CTRL |= (1 << 0); //Enable LCD Signals

My ISR

void LCD_IRQHandler(void)   <------- execute only once or twice not any further
{
   static unsigned int msk = 0;
     
   if (LCD_INTSTAT & (1 << 3)) //if vertical sync interrupt
   {
      LCD_INTCLR = 0xf;
      if(!msk)
      {
         msk = 1;
         FIO5PIN |= KEY_ROW_MASK; //Just toggle the pin to observe the ISR's execution on oscilloscope
      }
      else
      {
         msk = 0;
         FIO5PIN &= ~KEY_ROW_MASK;//Just toggle the pin to observe the ISR's execution on oscilloscope
      }
   }
   else
   {
      LCD_INTCLR = 0xf;
   }
}


Please help me solve this problem.

Outcomes