pdgilbert/i2c-test

Run time errors with i2c

Opened this issue · 3 comments

Examples are all compiling but there are run time errors with i2c initializing the sensors. Curiously, the *semi examples that work with stm32g4xx-hal fail with stm32f4xx-hal and those that work with stm32f4xx-hal fail with stm32g4xx-hal. See stm32-rs/stm32f4xx-hal#828.

The i2c problems using stm32f4xx_hal on blackpill are resolved by specifying a non zero opt-level. This is now set in Cargo.toml. (More detail at stm32-rs/stm32f4xx-hal#828.)

Blackpill run testing

  • working examples: aht20-bl-semi, aht20-dr-semi, aht20-em-semi, sht30-em-semi, shtc3-semi, xca9548a-aht20-bl, xca9548a-aht20-dr, xca9548a-aht20-em, and xca9548a-sht30
  • failing examples: xca9548a-shtc3 gives Normal mode measurement failedCrc.

Run testing using stm32f1xx-hal#6c5dc881 on bluepill (requires --release)

  • working examples: aht20-bl-semi, aht20-dr-semi, aht20-em-semi, sht30-em-semi, xca9548a-aht20-bl, xca9548a-aht20-dr, and xca9548a-aht20-em
  • failing examples:
    • sht30-em-semi` gives a "not yet implemented" error. (See stm32-rs/stm32f1xx-hal#523)
    • xca9548a-shtc3 gives Normal mode measurement failedCrc.

Run testing using stm32g4xx-hal on stm32g474xE

  • working examples: aht20-bl-semi, aht20-dr-semi, xca9548a-aht20-bl and xca9548a-aht20-dr.

  • failing examples:

  • aht20-em-semi stalls at aht.measure().
  • sht30-em-semi stalls at sen.measure().
  • shtc3-semi panics at examples/shtc3-semi.rs:86:65: Normal mode measurement failed: I2c(Nack)
  • xca9548a-aht20-em, xca9548a-sht30andxca9548a-shtc3 need*semi` examples to work first.