1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

REVONANO - Fix Baro initialization bug

The I2C SCLK pin (A8) was being changed by code used to support battery voltage sensing on the Revo. This code was run after PIOS_I2C_Init but before PIOS_MS5611_Init, causing a BUSY state on the I2C bus before the Barometer initialization code was run.
This commit is contained in:
Stefan Karlsson 2014-12-30 23:07:12 +01:00 committed by Alessio Morale
parent bbb0c34411
commit a3fc54ac0b

View File

@ -722,16 +722,6 @@ void PIOS_Board_Init(void)
PIOS_DEBUG_Init(pios_tim_servoport_all_pins, NELEMENTS(pios_tim_servoport_all_pins));
#endif
// Disable GPIO_A8 Pullup to prevent wrong results on battery voltage readout
GPIO_InitTypeDef gpioA8 = {
.GPIO_Speed = GPIO_Speed_2MHz,
.GPIO_Mode = GPIO_Mode_IN,
.GPIO_PuPd = GPIO_PuPd_NOPULL,
.GPIO_Pin = GPIO_Pin_8,
.GPIO_OType = GPIO_OType_OD,
};
GPIO_Init(GPIOA, &gpioA8);
PIOS_DELAY_WaitmS(50);
#if defined(PIOS_INCLUDE_ADC)