• I'm looking into getting the code online sooner rather than later, since the end goal is to see if the FIFO changed could be upstreamed.

    In the meantime, here's the code snippet that empties the FIFO.

      JsSysTime time3 = jshGetSystemTime();
      // Read samplesToRead * 6 (3 words gyro + 3 words accel) * 2 (two bytes per word) bytes
      unsigned char fifo_read_addr[1];
      fifo_read_addr[0] = 0x3e;
      jsi2cWrite(&i2cAccel, ACCEL_ADDR, 1, fifo_read_addr, false);
      jsi2cRead(&i2cAccel, ACCEL_ADDR, samplesToRead*6*2, (unsigned char *)dst, true);
    
      JsSysTime time4 = jshGetSystemTime();
    

    If I read e.g. 104 samples, so 1248 bytes of data, time4-time3 is approximately 150 ms. This seems like a lot slower then expected then, since it's only ~66kBits/s.

About

Avatar for erikboto @erikboto started