I'm struggling with the UART Rx interrupt on the dsPIC33EP512MU810.
The PPS code:
Code: Select all
PPS_Mapping(101, _OUTPUT, _U1TX); // Sets pin RP101 to be Output, and maps U1TX to it
PPS_Mapping(100, _INPUT, _U1RX); // Sets pin RP100 to be Input, and maps U1RX to it
Code: Select all
UART1_Init(9600);
delay_ms(100);
U1STAbits.URXISEL = 0; //Enable Rx interrupt
q = 32;
Code: Select all
void UART1_Interrupt() iv IVT_ADDR_U1RXINTERRUPT {
LATA = 0x0000;
uart_rd[LoopVar1] = UART1_Read();
LoopVar1++;
if (LoopVar1 >= q)
{
LoopVar1 = 0;
ready = 1;
}
U1RxIF_bit = 0;
}
that no interrupt is happening upon receiving an array of data.
Transmitting data seems to work fine.
What am I missing here?