Closed digitaldanny closed 3 years ago
With the most recent commit, I am able to read the WHO_AM_I register from the MPU6050. I am also reading an extra unecessary byte at the end (red in the screenshot below). This is due to using the AUTO_STOP I2C configuration. To allow a re-start after the initial register address write for a 1 byte read, I have to make the number of byte transfers = numBytes + 1. This means allows the re-start to happen, but also means I am reading 1 extra byte for a 1 byte read. I am going to try fixing this in the next commit by manually sending the stop flag.
Going with a polling approach I found on this TI forum.
WHO_AM_I Read
The MSP432 can now read pitch, yaw, and roll values from the MPU6050's DMP. Readings work for about 1 second before the i2c bus hangs. Increasing the delay seemed to help, but I'm not sure why I have to delay the i2c transfers still.
Having problems with the MPU6050 readings still.
Note - I upped the SMCLK to 24MHz from 12MHz in Pull Request #61. This will affect the I2C configurations for this PR too.
Also improved the accuracy of the delay functions, which may help with this PR as well. It would be a good idea to merge the master into this branch after #61 is merged.
Tried adding 0.1 uF capacitors on the Scl and Sda lines to remove any noise, but this just completely stopped the interrupt from triggering. Going to try probing the Scl and Sda lines with an oscilloscope. Maybe I will see some problems there that I did not see on the logic analyzer.
Comparing the MSP432 and Arduino SPI lines, I am seeing similar types of noise. I do not think the small blips in the waveform is what's causing the problems.
MSP432 I2C Lines
Arduino I2C Lines
I have the basic drivers working here. I am going to go ahead and merge and fix the remainder of features/bugs during the main program development.
Completed
Todo