It has been almost one month and I’m back to write some progress made on my ARM STM32 based AHRS development. I was actually working on my board design in Eagle , BOM.
After the PCB designs have been sent to FAB house here in Korea, I’m back to programming the prototype board. I could communicate with HMC5883L which is connected to Auxiliary I2C bus of MPU6050.
There are two modes( I2C master mode, Pass-Through mode) to access I2C device connected to auxiliary I2C bus of MPU6050. If we want to configure the HMC5883L, we must use Pass-Through mode. It can be done by enabling interface bypass multiplexer. In this mode system processor I2C bus pins 23 and 24 (SDA and SCL) directly connected to the auxiliary sensor I2C bus pins 6 and 7 (AUX_DA and AUX_CL). Once the auxiliary sensors have been configured by the system processor, the interface bypass multiplexer should be disabled so that the MPU-6050 auxiliary I2C master can take control of the sensor I2C bus and gather data from the auxiliary sensors.
At present, I’m only collecting HMC5833L data through Pass-Through mode. If we want to collect Quaternion computed by DMP of MPU6050 ( which includes HMC5883L data for fusion), we must switch to I2C master mode. Here is the picture of raw data(Acceleration, Gyroscope, Magnetometer) streaming to computer through Virtual COM port.
At present basic streaming is reliable( tested for 2 hours, 100KHz I2C Speed in 50Hz, 100Hz, 150Hz, 200Hz Timer interrupt mode). HMC5883L data rate is set at 75Hz. However it is not working when timer is set for 400Hz interrupts. I have to further investigate this . Sometime this week i will update GitHub I2C libraries repo & Doxygen documentation for the MPU6050 & HMC5883L on STM32F103xx Platform. You can find the libraries along with documentation in compressed html (.chm) format at my GitHub repository: https://github.com/Harinadha
These libraries are still in development stage. If you find any bugs or want to improve or have any suggestions, you are always welcome.