This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm fairly new to programming the MSP430 micro and I working on re factoring some old code for my current project.
I'm having an issue with the USCI_B0_ISR interrupt which i am using for acting on USCI_I2C_UCRXIFG & USCI_I2C_UCTXIFG interrupts read from UCB0IV. My problem is that following several received bytes, the USCI_I2C_UCTXIFG is immediately set and if I don't write any bytes to the OFS_UCBxTXBUF the interrupt doesn't fire again.
What I need to do is hold off writing any bytes to OFS_UCBxTXBUF until i have processed the RX command in the background main loop.
Could someone give me some guidance on how I would achieve this?
#pragma vector=USCI_B0_VECTOR __interrupt void USCI_B0_ISR(void) { switch (__even_in_range(UCB0IV, 12)) { case USCI_I2C_UCRXIFG: //receive data i2c_receive(USCI_B_I2C_slaveDataGet(USCI_B0_BASE)); break; case USCI_I2C_UCTXIFG: //Transmit data USCI_B_I2C_slaveDataPut(USCI_B0_BASE, *TXDataPtr++); break; } }
**Attention** This is a public forum