I am an experienced developer, mostly Cortex-M devices, but this is my first time with PICs.
I've implemented a UART driver for the application which uses interrupts. This is for comms with another processor in the system - an ARM. I now need to think about the bootloader for the PIC. The ARM will send commands to the PIC bootloader to write a new image for the application. It would be great to use the same UART driver for this but there is an issue with sharing interrupts between the two bits of firmware. I have a couple of ideas, but would be grateful for any guidance on the best way to resolve this:
1. I could use a modified version of the driver which polls rather than use interrupts - it'll work but seems unattractive.
2. I could make the driver uses the low priority interrupt in the bootloader, and high one in the application, and forward only the high priority interrupt in the vector table - sounds OK but will it work like I think?
I'm using a number of other interrupts in the application, but they all have the same priority.
Thanks.