good moorning!!!this is my problem :
I use a input capture modul of dspic to detect edges.
my input capture configuration :
/* Input Compares */
/* Config : Timer 3 for all, idle mode ON */
IC1CON = 0x0003; // Rising edge only
IC2CON = 0x0003; // Rising edge only
IC7CON = 0x0003; // Rising edge only
IC8CON = 0x0001; // Rising and falling edge
/* Enabling Interrupts for Input Compare */
IEC0bits.IC1IE = 1;
IEC0bits.IC2IE = 1;
IEC1bits.IC7IE = 1;
IEC1bits.IC8IE = 1;
/* Interrupts priority (priority decrease IC8 to IC1) */
IPC0 = 0x0040; // set IC1 priority
IPC1 = 0x0005; // set IC2 priority
IPC4 = 0x0760; // set IC7 and IC8 priority
/* Clear interrupt flags */
IFS0bits.IC1IF = 0;
IFS0bits.IC2IF = 0;
IFS1bits.IC7IF = 0;
IFS1bits.IC8IF = 0;
and one of my interupt fonction is (the four functions are all same) :
void __attribute__ ((__no_auto_psv__ )) _IC1Interrupt (void) {
IFS0bits.IC1IF = 0; // Clear flag
TMR3 = 0;
T3CON = 0x8000; // Start Timer 3
}
I use demo board dsPICDEM2 with mplab and c30.
But when I put the chip on my own board, interrupts functions doesn't run anymore.
I checked the voltages and connectors on my board, everything is allright !
I tested capture interrupt alone (I invert an output each time I go in interrupt), and it doesn't run. So I never go in interrupt functions.
Moreover, when I test the program on the demo board (dspicdem2) it runs perfectly in debug mode, but nothing in programmer mode
Is there a specific configuration I could have miss ?
Here is the configuration of my pic :
_FOSC(CSW_FSCM_OFF & HS); // External Crystal
_FWDT(WDT_OFF); //watch dog off
_FBORPOR(MCLR_DIS & PWRT_OFF);
_FGS(CODE_PROT_OFF);
thank you for your help (and sorry for my english !).