mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 09:10:35 +08:00
ADIS16477 reset on init and increase delay
This commit is contained in:
@@ -68,7 +68,7 @@ static constexpr uint8_t PROD_ID = 0x72;
|
||||
|
||||
#define PROD_ID_ADIS16477 0x405D /* ADIS16477 Identification, device number */
|
||||
|
||||
#define T_STALL 16
|
||||
#define T_STALL 200
|
||||
|
||||
#define GYROINITIALSENSITIVITY 250
|
||||
#define ACCELINITIALSENSITIVITY (1.0f / 1200.0f)
|
||||
@@ -81,6 +81,14 @@ ADIS16477::ADIS16477(int bus, const char *path_accel, const char *path_gyro, uin
|
||||
_bad_transfers(perf_alloc(PC_COUNT, "adis16477_bad_transfers")),
|
||||
_rotation(rotation)
|
||||
{
|
||||
#ifdef GPIO_SPI1_RESET_ADIS16477
|
||||
// ADIS16477 reset pin
|
||||
stm32_configgpio(GPIO_SPI1_RESET_ADIS16477);
|
||||
stm32_gpiowrite(GPIO_SPI1_RESET_ADIS16477, false);
|
||||
up_mdelay(10);
|
||||
stm32_gpiowrite(GPIO_SPI1_RESET_ADIS16477, true);
|
||||
#endif /* GPIO_SPI1_RESET_ADIS16477 */
|
||||
|
||||
_device_id.devid_s.devtype = DRV_ACC_DEVTYPE_ADIS16477;
|
||||
|
||||
_gyro->_device_id.devid = _device_id.devid;
|
||||
@@ -217,7 +225,6 @@ ADIS16477::probe()
|
||||
return PX4_OK;
|
||||
}
|
||||
|
||||
PX4_ERR("PROD_ID attempt %d", i);
|
||||
up_udelay(T_STALL);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
px4_add_module(
|
||||
MODULE drivers__imu__adis16477
|
||||
MAIN adis16477
|
||||
STACK_MAIN 1200
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
ADIS16477.cpp
|
||||
ADIS16477_gyro.cpp
|
||||
|
||||
Reference in New Issue
Block a user