I'm doing two kinds of test in the main loop. One will poll for data in rx and then echo it back to the user. The other will monitor the RILDE flag and turn on an LED to show when the rx pin is actually active. It also toggles a bunch of LEDs for the error flags (least significant 3 bits in U1STA register) in UART1 module.
Both the tests are working fine which indicates that the UART module is setup fine. Just the interrupt portion of it is faulty. So I tested this code on Explorer 16 Development Board, Bluetooth Audio Development Board and the Ethernet Started Kit. I did this to eliminate any hardware related issue as all the three boards are microchip certified hardware.
I don't know what I am missing out please help me fix this issue. Any help would be greatly appreciated.