I2C communication

Hi, there,
I'm connecting Adafruit ADS1115 ADC converter to Metawear R. In general, communication works fine (with Android API).
However, I would need to read out the sampled values at about 100 Hz. I have set up the data route and issue the read command (2 bytes) from timer with 10 ms interval. I have observed that the data which arrives through the data route is somehow bunched, first several read command go without response and then several responses are coming together with a timestamps within a couple milliseconds.
As soon as I reduce to 20 Hz acquisition - everything runs more or less smoothly in request-response sequence.

I guess there is a periodicity of I2C exchange on microcontroller. Would it be possible to force the I2C exchange without buffering or perform 100 Hz reads in any other way?

Thank you in advance

Comments

  • Hi Propan,

    We have a sighting of a similar issue with I2C reads from our iOS guru.  In certain cases, which we have not yet identified, a read command will not execute properly.  When a second read is requested both are executed together.  This sounds like the same signature as the issue you are having.

    There is a FIFO queue that sits between the many I2C modules and the I2C hardware that issues commands in sequence.  If you are not using any other peripherals on the I2C bus, there should not be any contention for your ADC reads.  In offline mode, the on board accelerometer can run up to 800Hz over I2C without issue, so 100Hz with your ADC should not be a problem.  This must be connected to the issue in the I2C passthrough module.

    We have an upcoming firmware release which is reworking the command queueing system in MetaWear.  As part of that release, the I2C sighting will be fixed.  The new queueing system has a priority feature which will further reduce the latency between I2C commands.

    Stay tuned!
  • Hi, @matt

    Thanks for an update here. As you understand this is also related to the analog input discussion that we have in other thread.
    Please keep me updated.


This discussion has been closed.