I have found something strange:
I inserted in the interrupt a toggle of an output pin:
if((*pSIC_ISR1 & TIMER6_INT) != 0){
//Interrupt Assertion
*pTIMER_STATUS = TIMIL6;
*pPORTFIO_TOGGLE = PF9_OUT;
Period = *pTIMER6_PERIOD;
ssync();
}
in the image below the yellow line is the rising front of the pwm signal at PG8, while the blue line is the toggle of PF9 in the interrupt function.
Image may be NSFW.
Clik here to view.
this the configuration of port G
*pPORTG_MUX = 0x0600;
*pPORTG_FER = 0x0700;
*pPORTGIO_DIR = 0xFA00;
*pPORTGIO_INEN = 0x04FF;
*pPORTGIO_POLAR = 0x0000;
*pPORTGIO_EDGE = 0x00FF;
*pPORTGIO_BOTH = 0x0000;
*pPORTGIO_MASKA = 0x00FF;
and this is the configurations of timer6 and interrupts:
*pTIMER6_CONFIG = WDTH_CAP | IRQ_ENA | PULSE_HI | PERIOD_CNT;
adi_int_SICSetIVG(ADI_INT_TIMER6, 13);
register_handler(ik_ivg13,Timers_ISR);
adi_int_SICEnable(ADI_INT_TIMER6);
How can I avoid this double interrupt?