Hello,
I Setup a 10us Timer (Timer 0).
If the LCD is off:
LCD_CTRL &= ~(1 << LCD_CTRL_LCDEN);
The timer works correct. But if I switch on the LCD
LCD_CTRL |= 1 << LCD_CTRL_LCDEN;
The timer is not sync. It from 10 - 20 us every clock is different.
To be sure that there is no interrupt from the lcd I do this:
LCD_INTMSK = 0x00000000;
LCD_INTCLR = 0xffffffff;
CRSR_INTMSK = 0x00000000;
CRSR_INTCLR = 0xffffffff;
With clock I mean my toggl of an io pin.
void sysTimeISR(void)
{
ISR_ENTRY();
if(flip)
{
IOCLR1 |= (1<<8);
flip = 0;
} else {
IOSET1 |= (1<<8);
flip=1;
}
ISR_EXIT();
}
I switched all other peripheral off that I'm sure that is nothing other.
All other interrupts are initialized as default like this:
/* initialize VIC */
VICIntEnClr = 0xffffffff;
VICVectAddr = 0x00000000;
VICIntSelect = 0x00000000; /* all IRQ */
/* set all the vector and vector control register to 0 */
for ( i = 0; i < 32; i++ ) {
vect_addr = (uint32_t *)(VIC_BASE_ADDR + VECT_ADDR_INDEX + i*4);
vect_prio = (uint32_t *)(VIC_BASE_ADDR + VECT_PRIO_INDEX + i*4);
*vect_addr = 0x00000000;
*vect_prio = 0x0000000F;
}
and the irq for timer 0 is initialized like this:
VICIntSelect &= ~(VIC_CHAN_TO_MASK(VIC_CHAN_NUM_Timer0));
VICIntEnClr = VIC_CHAN_TO_MASK(VIC_CHAN_NUM_Timer0);
VICVectAddr4 = (uint32_t)sysTimeISR;
VICVectPriority4 = 0;
VICIntEnable = VIC_CHAN_TO_MASK(VIC_CHAN_NUM_Timer0);
Has anybody an idea why my LCD disturb my timer interrupt?
LCD controller disturbs my timer irq (LPC2478)
Started by ●April 26, 2009
Reply by ●April 27, 20092009-04-27
--- In l..., Benedikt Sauter wrote:
>
> Hello,
>
> I Setup a 10us Timer (Timer 0).
>
> If the LCD is off:
>
> LCD_CTRL &= ~(1 << LCD_CTRL_LCDEN);
>
> The timer works correct. But if I switch on the LCD
>
> LCD_CTRL |= 1 << LCD_CTRL_LCDEN;
>
> The timer is not sync. It from 10 - 20 us every clock is different.
>
Can a DMA be interrupted on LPC? If not, the LCD buffer loads may delay the firing of your timer interrupt, maybee?
Your timer period seems very short?
Rgds,
Martin
>
> Hello,
>
> I Setup a 10us Timer (Timer 0).
>
> If the LCD is off:
>
> LCD_CTRL &= ~(1 << LCD_CTRL_LCDEN);
>
> The timer works correct. But if I switch on the LCD
>
> LCD_CTRL |= 1 << LCD_CTRL_LCDEN;
>
> The timer is not sync. It from 10 - 20 us every clock is different.
>
Can a DMA be interrupted on LPC? If not, the LCD buffer loads may delay the firing of your timer interrupt, maybee?
Your timer period seems very short?
Rgds,
Martin