A question about interrup uart.
Posted: 02 May 2012 20:38
Hello . if i configured my uart2 interrup this form:
/ Set interrupt priority levels to 3
U2IP0_bit = 0; // Set UART2 interrupt
U2IP1_bit = 1; // priority level
U2IP2_bit = 1; // to 3
UART2_Init(115200); // Initialize UART2 module
Delay_100ms; // Wait for UART module to stabilize
U2RXIE_bit = 1; // Enable UART Receive Interrupt
EnableInterrupts();
and use this code for vector of interrup.
void interrupt() iv IVT_UART_2 ilevel 7 ics ICS_SRS {
...
U2RXIF_bit = 0; // Clear UART2 RX Interrupt flag
}
my true priority is 3 of 7?
why and can put
void interrupt() iv IVT_UART_2 ilevel 3 ics ICS_SRS {
...
U2RXIF_bit = 0; // Clear UART2 RX Interrupt flag
}
the compiler shoe error.
thank you.
king regard.
Alcides Ramos.
/ Set interrupt priority levels to 3
U2IP0_bit = 0; // Set UART2 interrupt
U2IP1_bit = 1; // priority level
U2IP2_bit = 1; // to 3
UART2_Init(115200); // Initialize UART2 module
Delay_100ms; // Wait for UART module to stabilize
U2RXIE_bit = 1; // Enable UART Receive Interrupt
EnableInterrupts();
and use this code for vector of interrup.
void interrupt() iv IVT_UART_2 ilevel 7 ics ICS_SRS {
...
U2RXIF_bit = 0; // Clear UART2 RX Interrupt flag
}
my true priority is 3 of 7?
why and can put
void interrupt() iv IVT_UART_2 ilevel 3 ics ICS_SRS {
...
U2RXIF_bit = 0; // Clear UART2 RX Interrupt flag
}
the compiler shoe error.
thank you.
king regard.
Alcides Ramos.