In the I2C example code, there are a few statements such as the one below:
UCB0CTL1 |= UCTXSTT; // I2C start condition
while (UCB0CTL1 & UCTXSTT); // Start condition sent?
Are these while statements considered safe - the program doesn't hang here if there's a problem? When debugging, my program frequently hangs on these statements - usually it means something else is wrong - but for the life of a product, I worry that a mishandled byte could leave the MCU waiting forever for response to a start, stop, transmit, or receive.
I could certainly use the watchdog timer, but I'm wondering if it's wiser to write something besides a while statement to check for the I2C response. Thanks for any feedback!