mpu9520:Use maximum clock rate

The MPU9250 and MPU6500 buth support 1 Mhz and 20 Mhz. Buy upping the clocc we will get the maximum clock rate the driver
   supports that is <= 20 Mhz. This will boost the FMUv4Pro SPI speed to 11.25 Mhz (it was half that)
This commit is contained in:
David Sidrane
2017-07-10 10:38:06 -10:00
committed by Lorenz Meier
parent 22d0ea15de
commit 3c42c8f7fa

View File

@@ -74,12 +74,16 @@
/*
The MPU9250 can only handle high SPI bus speeds on the sensor and
interrupt status registers. All other registers have a maximum 1MHz
SPI speed
* The MPU9250 can only handle high SPI bus speeds of 20Mhz on the sensor and
* interrupt status registers. All other registers have a maximum 1MHz
* SPI speed
*
* The Actual Value will be rounded down by the spi driver.
* for a 168Mhz CPU this will be 10.5 Mhz and for a 180 Mhz CPU
* it will be 11.250 Mhz
*/
#define MPU9250_LOW_SPI_BUS_SPEED 1000*1000
#define MPU9250_HIGH_SPI_BUS_SPEED 11*1000*1000 /* will be rounded to 10.4 MHz, within margins for MPU9250 */
#define MPU9250_HIGH_SPI_BUS_SPEED 20*1000*1000
device::Device *MPU9250_SPI_interface(int bus, bool external_bus);