Reply by mjames_doveridge●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?
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?