Hello,
I'm running into a bit of an issue with SPI communication, and I'm trying to figure out what the best practice would be. I am attempting to handle the TX and RX using an ISR, however the eUSCI has only one interrupt vector that is shared for transmission and for reception. I have tried writing a single ISR to handle both interrupts, but it seems to sometimes miss, and I'm wondering if it's bad practice to do this, or if I should be able to get it to work. What would be the appropriate method for implementing SPI on this device, if I can only use one ISR for SPI? I have also tried polling using while(!(UCA0IFG&UCTXIFG)) and while(!(UCA0IFG&UCRXIFG)), but having trouble getting this to work for a packet size larger than 2. Also, as a side question, the UCTXIFG flag doesn't seem to clear when I write to the UCA0TXBUF, isn't it supposed to?
I can post code if requested, but I am really looking for a general best practice for the hardware I have.
Thank you