forked from Archive/PX4-Autopilot
Merge pull request #552 from PX4/spi_speedup
Cranking up bus speeds for all sensors to achievable 10.4 MHz
This commit is contained in:
commit
aed7133649
|
@ -19,12 +19,18 @@ fi
|
||||||
if mpu6000 start
|
if mpu6000 start
|
||||||
then
|
then
|
||||||
echo "using MPU6000"
|
echo "using MPU6000"
|
||||||
set BOARD fmuv1
|
fi
|
||||||
else
|
|
||||||
echo "using L3GD20 and LSM303D"
|
if l3gd20 start
|
||||||
l3gd20 start
|
then
|
||||||
lsm303d start
|
echo "using L3GD20(H)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if lsm303d start
|
||||||
|
then
|
||||||
set BOARD fmuv2
|
set BOARD fmuv2
|
||||||
|
else
|
||||||
|
set BOARD fmuv1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start airspeed sensors
|
# Start airspeed sensors
|
||||||
|
|
|
@ -21,6 +21,7 @@ MODULES += drivers/px4fmu
|
||||||
MODULES += drivers/px4io
|
MODULES += drivers/px4io
|
||||||
MODULES += drivers/boards/px4fmu-v2
|
MODULES += drivers/boards/px4fmu-v2
|
||||||
MODULES += drivers/rgbled
|
MODULES += drivers/rgbled
|
||||||
|
MODULES += drivers/mpu6000
|
||||||
MODULES += drivers/lsm303d
|
MODULES += drivers/lsm303d
|
||||||
MODULES += drivers/l3gd20
|
MODULES += drivers/l3gd20
|
||||||
MODULES += drivers/hmc5883
|
MODULES += drivers/hmc5883
|
||||||
|
|
|
@ -316,7 +316,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
L3GD20::L3GD20(int bus, const char* path, spi_dev_e device) :
|
L3GD20::L3GD20(int bus, const char* path, spi_dev_e device) :
|
||||||
SPI("L3GD20", path, bus, device, SPIDEV_MODE3, 8000000),
|
SPI("L3GD20", path, bus, device, SPIDEV_MODE3, 11*1000*1000 /* will be rounded to 10.4 MHz, within margins for L3GD20 */),
|
||||||
_call_interval(0),
|
_call_interval(0),
|
||||||
_reports(nullptr),
|
_reports(nullptr),
|
||||||
_gyro_range_scale(0.0f),
|
_gyro_range_scale(0.0f),
|
||||||
|
|
|
@ -486,7 +486,7 @@ private:
|
||||||
|
|
||||||
|
|
||||||
LSM303D::LSM303D(int bus, const char* path, spi_dev_e device) :
|
LSM303D::LSM303D(int bus, const char* path, spi_dev_e device) :
|
||||||
SPI("LSM303D", path, bus, device, SPIDEV_MODE3, 8000000),
|
SPI("LSM303D", path, bus, device, SPIDEV_MODE3, 11*1000*1000 /* will be rounded to 10.4 MHz, within safety margins for LSM303D */),
|
||||||
_mag(new LSM303D_mag(this)),
|
_mag(new LSM303D_mag(this)),
|
||||||
_call_accel_interval(0),
|
_call_accel_interval(0),
|
||||||
_call_mag_interval(0),
|
_call_mag_interval(0),
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
SPI speed
|
SPI speed
|
||||||
*/
|
*/
|
||||||
#define MPU6000_LOW_BUS_SPEED 1000*1000
|
#define MPU6000_LOW_BUS_SPEED 1000*1000
|
||||||
#define MPU6000_HIGH_BUS_SPEED 10*1000*1000
|
#define MPU6000_HIGH_BUS_SPEED 11*1000*1000 /* will be rounded to 10.4 MHz, within margins for MPU6K */
|
||||||
|
|
||||||
class MPU6000_gyro;
|
class MPU6000_gyro;
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ MS5611_spi_interface(ms5611::prom_u &prom_buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
MS5611_SPI::MS5611_SPI(int bus, spi_dev_e device, ms5611::prom_u &prom_buf) :
|
MS5611_SPI::MS5611_SPI(int bus, spi_dev_e device, ms5611::prom_u &prom_buf) :
|
||||||
SPI("MS5611_SPI", nullptr, bus, device, SPIDEV_MODE3, 6*1000*1000),
|
SPI("MS5611_SPI", nullptr, bus, device, SPIDEV_MODE3, 11*1000*1000 /* will be rounded to 10.4 MHz */),
|
||||||
_prom(prom_buf)
|
_prom(prom_buf)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue