SLAA249B April 2005 – September 2018 MSP430F169 , MSP430F169 , MSP430F5252 , MSP430F5252 , MSP430F5253 , MSP430F5253 , MSP430F5254 , MSP430F5254 , MSP430F5255 , MSP430F5255 , MSP430F5256 , MSP430F5256 , MSP430F5257 , MSP430F5257 , MSP430F5258 , MSP430F5258 , MSP430F5259 , MSP430F5259
This is the slave code source for the master code in msp430x26x_SMB_MST_timeout.c. The slave receives one byte and transmits two bytes to the master. After the first byte is transmitted, the transmit interrupt enable (UCxxTXIE) is disabled to prevent the slave from sending the second byte and causing the clock line (SCL) to be held low during that period, exercising the timeout features of the SMBus protocol. This creates a timeout condition that is detected by the master, causing the master and slave to reset (or perform any other desired function). An LED is toggled upon a timeout condition. The slave stays in LPM4 waiting for an instruction from the master, making use of the automatic clock activation feature on this device. To transmit and receive bytes in a normal fashion (by avoiding the timeout condition), the user can comment out the following line in the TX ISR from this code:
// IE2 &= ~UCB0TXIE; // Read the comment below
This is also documented in the code.