Content originally posted in LPCWare by mh.hoseinzade on Wed Dec 16 10:27:19 MST 2015
Thank you "mc"
I do all of these and the program compiled successfully. however when I load the program to LPC1788, It does not work
In debug I realized that the CPU hang up in the GUI_init() and when I break program execution, I saw that the cpu hang up in the I2C routine, specifically in the following routine and in the instruction I specified by red collor:
static unsigned char _I2C_CheckStatus(void) {
  unsigned char r = 0;
  //
  // Wait for I2C status to change
  //
 [color=#f00] while ((I2C_CONSET & (1 << 3)) == 0) {  // SI == 0[/color]
  }
  //
  // Read I2C state
  //
  r = I2C_STAT;
  return r;
}
what do you think about it? what is the problem?