2020-12-14 02:43 PM
For example, the HTS221 sensor responds correctly to the "WhoAmI" query. It then responds with a NAN when trying to read the temperature or the humidity. Some of the other drivers do not even respond to the "WhoAmI" command correctly. Would using these drivers be the correct approach, or is there some other preferred method?
2020-12-14 11:59 PM
Hi @JSans.1 ,
some hardware and firmware question to try to narrow down the issue: on the hardware side, are the 4 sensors (humidity and..?) using separated I2C lines? And which Vdd / VddIO and pull-up resistors are you using? I see that most of the STM32L053 MCUs have only two I2C lines...
From a firmware side, please note that you have to initialize properly the I2C lines from the master STM32L053 side, since the Github drivers are platform independent or embed examples only for the NUCLEO_F411RE.
Did you check the I2C patterns being sent and coming from the sensors, with an oscilloscope?
-Eleon
2020-12-16 02:05 PM
Hello Eleon,
The four drivers that we are using are the HTS221, LPS25HB, LSM6DSM, and BH1750. They are all attached to the same I2C lines. These are configured on PB8 and PB9 as I have seen in a few places. Each of the INT pins for each sensor are tied to GPIOs with their respective pull-up or pull-down resistors. I want to say the HTS221 was giving me temp and humidity readings before, but now returns NaN. I recently updated the IDE, but it did not appear to change anything I can see.
I am currently working on getting my oscilloscope set up and connected to my hardware.
Jason
2020-12-21 07:47 AM
Hi Jason,
did you find any issue with the oscilloscope?
Are the 3 non-running devices off / in sleep mode while the fourth one is running?
-Eleon