mirror of https://github.com/ArduPilot/ardupilot
HAL_ChibiOS: enable I2C clearing on F412 board only
may be needed on other boards in the future, but for now we only know its needed on an I2C 20789, which is rare
This commit is contained in:
parent
40142e5aef
commit
aee6462deb
|
@ -109,8 +109,11 @@ static THD_FUNCTION(main_loop,arg)
|
|||
{
|
||||
daemon_task = chThdGetSelfX();
|
||||
|
||||
//Clear all I2C Buses
|
||||
#ifdef HAL_I2C_CLEAR_BUS
|
||||
// Clear all I2C Buses. This can be needed on some boards which
|
||||
// can get a stuck I2C peripheral on boot
|
||||
ChibiOS::I2CBus::clear_all();
|
||||
#endif
|
||||
|
||||
ChibiOS::Shared_DMA::init();
|
||||
|
||||
|
|
|
@ -133,3 +133,6 @@ define HAL_BARO_DEFAULT HAL_BARO_20789_I2C_I2C
|
|||
define HAL_BARO_20789_I2C_BUS 1
|
||||
define HAL_BARO_20789_I2C_ADDR_PRESS 0x63
|
||||
define HAL_BARO_20789_I2C_ADDR_ICM 0x68
|
||||
|
||||
# unstick 20789 on I2C on boot
|
||||
define HAL_I2C_CLEAR_BUS
|
||||
|
|
Loading…
Reference in New Issue