We talked about how long it takes to read data over I2C. I updated the MPU example to measure the time it takes to read all accelerometer, gyroscope, and magnetometer measurements. It gave me a reason to implement timers in the hardware crate.
~2.5ms @ 100KHz. Here's the logic analyzer output. Top-right corner shows the measured time of the transaction. Software timer indicates the same timing.
We expect that we would be 4x faster at 400KHz. And yup, we see ~625us @ 400KHz. Logic analyzer output looks the same, but the scaling is different. Note the timing in the top-right corner. Software timer indicates the same thing.
The example now uses 400KHz by default. Change it in the control.rs module.
We talked about how long it takes to read data over I2C. I updated the MPU example to measure the time it takes to read all accelerometer, gyroscope, and magnetometer measurements. It gave me a reason to implement timers in the hardware crate.
~2.5ms @ 100KHz. Here's the logic analyzer output. Top-right corner shows the measured time of the transaction. Software timer indicates the same timing.
We expect that we would be 4x faster at 400KHz. And yup, we see ~625us @ 400KHz. Logic analyzer output looks the same, but the scaling is different. Note the timing in the top-right corner. Software timer indicates the same thing.
The example now uses 400KHz by default. Change it in the
control.rs
module.