AnsweredAssumed Answered

fopen on I2C hangs after an fclose

Question asked by mrupp_viatechnology on May 26, 2015
Latest reply on May 31, 2015 by Daniel Chen

I am using MQX3.8 and am trying to close (fclose) an I2C interface then reopen it (fopen)


The following code is used to first open the connection



file_iic0 = fopen("ii2c1fb:", NULL);


The following code is used to close the connection

fclose(file_iic0) ;


The fopen succeeds and my program can communicate with an I2C device

The fclose succeeds


Then I try to "reopen" the device using

file_iic0 = fopen("ii2c1fb:", NULL);


The fopen never returns. 


Is there some problem closing an I2C connection then reopening it?