diff options
author | px4dev <px4@purgatory.org> | 2013-01-18 00:43:57 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-01-18 00:43:57 -0800 |
commit | bc35bb23dd8cb035c080f8ef8b4cd7a30d5184c2 (patch) | |
tree | c84795237631635d6441c9a6d68f5e18527fee75 /nuttx/configs/px4fmu | |
parent | 7d7c352fb44b718cb96096a624a19b5225e39f92 (diff) | |
download | px4-firmware-bc35bb23dd8cb035c080f8ef8b4cd7a30d5184c2.tar.gz px4-firmware-bc35bb23dd8cb035c080f8ef8b4cd7a30d5184c2.tar.bz2 px4-firmware-bc35bb23dd8cb035c080f8ef8b4cd7a30d5184c2.zip |
HOTFIX: disable interrupt-driven I2C mode, configure pessimistic I2C timeout, correct handling of the NAK generation for I2C master reads.
This looks like it addresses the recent I2C lockup issue, unfortunately it also increases CPU consumption by ~5% for the I2C sensor bus.
Diffstat (limited to 'nuttx/configs/px4fmu')
-rwxr-xr-x | nuttx/configs/px4fmu/nsh/defconfig | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nuttx/configs/px4fmu/nsh/defconfig b/nuttx/configs/px4fmu/nsh/defconfig index 8a76f0e05..7bb4d1003 100755 --- a/nuttx/configs/px4fmu/nsh/defconfig +++ b/nuttx/configs/px4fmu/nsh/defconfig @@ -352,17 +352,19 @@ CONFIG_CAN2_BAUD=700000 # I2C configuration # CONFIG_I2C=y -#CONFIG_I2C_POLLED=y +CONFIG_I2C_POLLED=y CONFIG_I2C_TRANSFER=y CONFIG_I2C_TRACE=n CONFIG_I2C_RESET=y -# Allow 180 us per byte, a wide margin for the 400 KHz clock we're using -# e.g. 9.6 ms for an EEPROM page write, 0.9 ms for a MAG update -CONFIG_STM32_I2CTIMEOUS_PER_BYTE=200 -# Constant overhead for generating I2C start / stop conditions -CONFIG_STM32_I2CTIMEOUS_START_STOP=700 -# XXX this is bad and we want it gone -CONFIG_I2C_WRITEREAD=y + +# Dynamic timeout +#CONFIG_STM32_I2C_DYNTIMEO=y +#CONFIG_STM32_I2C_DYNTIMEO_STARTSTOP=500 +#CONFIG_STM32_I2C_DYNTIMEO_USECPERBYTE=200 + +# Fixed per-transaction timeout +CONFIG_STM32_I2CTIMEOSEC=0 +CONFIG_STM32_I2CTIMEOMS=10 # # General build options |