- Code: Select all
t1 = gpioTick();
result = i2cReadI2CBlockData(m_currentI2C, regAddr, reinterpret_cast<char*>(data) + position, getLength);
t2 = gpioTick();
Most of the results of this are in the range 200-400, but I get occasional (1 in 1000) spikes in the 1000-10000 range. Any suggestions on ways to avoid this would be appreciated. Is it just the MPU chip being unreliable? The above code is in a loop that is triggered by an interrupt from the MPU.