You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTS221 temperature sensor code in the Sensor Push, Pull, and Action examples doesn't work: apart from the initial toggling of SCK, there is no activity on the I2C bus.
This is because the final thing i2c_init does is to disable the clock to the I2C controller:
With the Sensor Action example from c25da89, I get:
00> [000] Device booted
00>
00>
00> [001] temp 226 dC
00>
00> [002] tried to start an interface (226) that is not registered
00>
00> [003] temp 226 dC
00>
00> [004] tried to start an interface (226) that is not registered
00>
with a little heat:
00>
00> [053] temp 363 dC
00>
00> [054] temp 366 dC
00>
00> [055] temp 373 dC
00>
00> [056] temp 356 dC
00>
00> [057] temp 350 dC
00>
00> [058] temp 347 dC
00>
so values >255 displaying OK.
Not sure the significance of the "tried to start an interface (xxx) that is not registered" - but that behaviour is unchanged
The HTS221 temperature sensor code in the Sensor Push, Pull, and Action examples doesn't work: apart from the initial toggling of SCK, there is no activity on the I2C bus.
This is because the final thing
i2c_init
does is to disable the clock to the I2C controller:and there is nothing in the rest of the code to re-enable it.
A fix is to add
i2c_acquire(hts221_handle)
andi2c_release(hts221_handle)
around anything which requires I2C.Having done that, I do see activity on the bus, and get temperature readings.
Using SHA-1: 42d6bbf
The text was updated successfully, but these errors were encountered: