Arduino Mega blocked while using requesFrom in I2C communication

Arduino Mega2560 blocked while using requesFrom in I2C communication,the blocked code as following:
while(TWI_MRX == twi_state){
continue;
}

and i add the timecount:
timeCount = 0;
while(TWI_MRX == twi_state){
timeCount++;
if (timeCount > 10000) {
break;
}
continue;
}
But when it returned ,the i2c bus could not worked again,even call the twi_releaseBus…
This is the readBytes function in 200Hz:

int readBytes(byte addr, byte* data, int num)
{
int res = 0;
Wire.beginTransmission(ADDR);
Wire.write(addr);
Wire.endTransmission();
res = Wire.requestFrom(ADDR, num,1); // blocked here(the arduino is freezed)
if (res == 0xFF) {
Serial.print(“I2C Wait Ready Block return\n”);
} else if (res == 0xFE) {
Serial.print(“I2C Reading Block return\n”);
for (int i=0; i<res; i++) data = 0xff;

  • } else { *
  • Serial.print(res);Serial.print("\n");*
    _ for (int i=0; i<res; i++) data = Wire.read();_
    * }*
    * return res;*
    }
    any help thanks…

Hi CCshader,

If you get any help it will be a miracle.

You have not given us all your code.
You have not given a schematic.
You have not described what i2c device you are using.
You have not posted in the correct part of the forum.
You have not used code tags.
You have not read the forum rules.

You should start over, but do all these things.

Best of luck

Paul