2 Replies Latest reply on Dec 27, 2017 1:32 AM by user_497030312

    Why is used in I2CMasterSendStop() infinite loop

    user_497030312

      I use I2CMasterSendStop() function, but from time to time (not always) my program hangs in this infinite (for any reason) loop:

      ........

              while(!SHT_CHECK_INTR_MASTER(SHT_INTR_MASTER_I2C_STOP     |

                                                        SHT_INTR_MASTER_I2C_ARB_LOST |

                                                        SHT_INTR_MASTER_I2C_BUS_ERROR))

              {

                  /* Wait until Stop has been generated */

              }

      .........

       

      What is the reason to have such a while ?

      How can I avoid this problem?

       

      Thank you

      P