Muchas gracias Suky y willynovi por responder.
Recordé un tema que hay que tener atención y por lo que veo lo tienes comentado, ojo en ello! Cuando usas múltiples vectores, en la interrupción debe estar correctamente indicado:
void __ISR(_RTCC_VECTOR, ipl3) RtccIsr(void){....
void __ISR(_TIMER_3_VECTOR, ipl2) Timer3Handler(void){...
Respecto a esto Suky, tengo entendido que iplx (x es un numero del 1 al 7) define la prioridad de interrupción, pero si la tengo configurada mas arriba con la instrucción IPC3bits.T3IP=7 por ejemplo, esto es redundante, ¿O me equivoco?
Les cuento ahora que ya me funciona un poco mejor el código, entra a las dos interrupciones gracias a que seguí la recomendación de Suky de habilitar los vectores luego de toda la configuración, y agregue ademas la instrucción INTEnableInterrupts(). Pero en la rutina de atención a la interrupción del adc no puedo modificar el contenido del PR2 igualándolo al valor digitalizado, ya que si hago esto ingresa a la interrupción del Timer cuando al programa se le antoje, es decir a veces entra y a veces no...es muy raro, no logro entender porque...
El código ahora me quedo así, y funciona muy bien las dos interrupciones, que era el problema principal

:
#include <proc/p32mx230f064b.h>
// DEVCFG3
// USERID = No Setting
#pragma config PMDL1WAY = ON // Peripheral Module Disable Configuration (Allow only one reconfiguration)
#pragma config IOL1WAY = ON // Peripheral Pin Select Configuration (Allow only one reconfiguration)
#pragma config FUSBIDIO = OFF // USB USID Selection (Controlled by Port Function)
#pragma config FVBUSONIO = OFF // USB VBUS ON Selection (Controlled by Port Function)
// DEVCFG2
#pragma config FPLLIDIV = DIV_1 // PLL Input Divider (1x Divider)
#pragma config FPLLMUL = MUL_15 // PLL Multiplier (15x Multiplier)
#pragma config UPLLIDIV = DIV_1 // USB PLL Input Divider (1x Divider)
#pragma config UPLLEN = OFF // USB PLL Enable (Disabled and Bypassed)
#pragma config FPLLODIV = DIV_1 // System PLL Output Clock Divider (PLL Divide by 1)
// DEVCFG1
#pragma config FNOSC = PRI // Oscillator Selection Bits (Primary Osc (XT,HS,EC))
#pragma config FSOSCEN = ON // Secondary Oscillator Enable (Enabled)
#pragma config IESO = ON // Internal/External Switch Over (Enabled)
#pragma config POSCMOD = OFF // Primary Oscillator Configuration (Primary osc disabled)
#pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin (Disabled)
#pragma config FPBDIV = DIV_1 // Peripheral Clock Divisor (Pb_Clk is Sys_Clk/1)
#pragma config FCKSM = CSDCMD // Clock Switching and Monitor Selection (Clock Switch Disable, FSCM Disabled)
#pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler (1:1048576)
#pragma config WINDIS = OFF // Watchdog Timer Window Enable (Watchdog Timer is in Non-Window Mode)
#pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT Disabled (SWDTEN Bit Controls))
#pragma config FWDTWINSZ = WISZ_25 // Watchdog Timer Window Size (Window Size is 25%)
// DEVCFG0
#pragma config JTAGEN = ON // JTAG Enable (JTAG Port Enabled)
#pragma config ICESEL = ICS_PGx3 // ICE/ICD Comm Channel Select (Communicate on PGEC3/PGED3)
#pragma config PWP = OFF // Program Flash Write Protect (Disable)
#pragma config BWP = OFF // Boot Flash Write Protect bit (Protection Disabled)
#pragma config CP = OFF // Code Protect (Protection Disabled)
#include <stdio.h>
#include <stdlib.h>
#include <xc.h>
#include <sys/attribs.h>
#include <plib.h>
int main() {
ANSELB=0x8000; //RB15 como analogico y los demas como digitales
TRISB=0x8000; //1=entrada; 0=salida
LATB=1; //Reseteo los puertos
//Configuración ADC************************************************
AD1CHSbits.CH0SA=9; //Entrada de muestras por AN9
AD1CON1=0x00e4;
AD1CON2=0x0000;
AD1CON3=0x0103;
IEC0bits.AD1IE=1;
IPC5bits.AD1IP=6; //Prioridad
//IPC5bits.AD1IS=1; //Sub-prioridad
IFS0bits.AD1IF=0;
AD1CON1bits.ADON=1;
//******************************************************************/
//Configuración Timer 2 y 3 como 32 bits*********************************
T2CONbits.ON=0;
T2CONbits.TCKPS=0; //Prescaler 1:1
T3CONbits.ON=0;
T2CONbits.T32=1; //Timers 2 y 3 como contadores de 32 bits
TMR2=0; //Borro contenido de los registros del timer
PR2=0x00002710; //Cargo registros de comparación del timer (valor en el cual se resetea)
IPC3SET = 0x00000004; // Set priority level = 1
IPC3SET = 0x00000001; // Set sub-priority level = 1
// Could have also done this in single operation
// by assigning IPC5SET = 0x00000005
IFS0bits.T3IF=0; //Borro flag de interrupción
IEC0bits.T3IE=1; //Enable Timer5 interrupts
IPC3bits.T3IP=7; //Prioridad
//IPC3bits.T3IS=3; //Sub-prioridad
T2CONbits.ON=1; //Enciendo el timer
//*******************************************************************
//INTEnableSystemMultiVectoredInt();
//INTEnableSystemSingleVectoredInt();
INTConfigureSystem(INT_SYSTEM_CONFIG_MULT_VECTOR);
INTEnableInterrupts();
while(1)
{
}
}
void __ISR(_ADC_VECTOR,/*IPL6AUTO*/) ADCHandler(void)
{
IFS0bits.AD1IF=0; //Borro flag de interrupción
/*T2CONbits.ON=0;
TMR2=0;
PR2=ADC1BUF0+0xFF;
T2CONbits.ON=1;*/
}
void __ISR(_TIMER_3_VECTOR/*,IPL7AUTO*/) Timer3Handler(void)
{
IFS0bits.T3IF=0;
LATBbits.LATB14=!LATBbits.LATB14;
}En lugar de controlar el Buzzer haciendo cambios al PR del Timer, voy a intentar ahora usar el PWM para ello, ya que la forma que intenté en primer lugar no esta funcionando. Y voy a seguir manteniendo varias interrupciones para verificar que no surjan nuevos problemas. Luego cuento como me fue.
¡¡Saludos!!