Open SloMusti opened 4 years ago
Interesting. The Wire.setClockLowTimeout(250) command actually just enables the timeout to abort a transfer if the slave stretched SCL for too long. Per default (and I2C spec) this timeout is disabled.
Which of the images is "good" and which one is "bad" ?
@GrumpyOldPizza updated the post with description of images, my bad as they were only specified in filenames. Should be clear now.
Abort does not seem to happen here, more like that the clock stretching is ignored.
I have been testing the SCD30 sensor(https://www.sensirion.com/en/environmental-sensors/carbon-dioxide-sensors-co2/) with https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library library and the sensor does not work with this core. What occurs is that the measurement start commands do not get recognized and the sensor does not start measuring.
Minor modifications for this library to work with the core: https://github.com/sparkfun/SparkFun_SCD30_Arduino_Library/blob/master/src/SparkFun_SCD30_Arduino_Library.cpp#L43 adding
_i2cPort->setClockLowTimeout(250);
to enable clock stretching correctlySame library works well on ESP32 and other boards used for testing.
Issue breakdown: Communication seems to work with the decoder as all writes get acknowledged and the protocol decoder will give the identical printout, however we can see two key differences in the logical levels of SDA and SCL.
Possible causes of this issue:
working_scd30_esp32_clock-stretch
working_scd30_esp32_sda_released_stratching
not-working_scd30_stm32l0_no_stretch_at_end
not-working_stm32l0_no_sda_release
![not-working_stm32l0_no_sda_release](https://user-images.githubusercontent.com/1584734/61969244-537dde80-afda-11e9-9625-61198aa017ae.png)
@GrumpyOldPizza any thoughts?