2021-11-03 04:31 AM
I am developing a hardware using as a board a Nucleo 144 to which I have to connect via I2C (pins set via stmcubeMX) a Melexis 90640 thermal scanner, I am experiencing problems with communication or rather, I struggle to understand the logic of reading. Is there any working example?
2021-11-03 08:50 AM
did you checked if both I2C pullups are in place and have correct values?
2021-11-04 12:21 AM
the project was created entirely with stm32cubeide setting with cubemx all the pins of my wiring diagram so there should be no problems of this type, I just wanted to know if there is an example to follow for the correct sequence of instruction to read from the thermal scanner connected in I2C leaving it waiting for an event (in my case a person who will approach to read his body temperature)
2021-11-04 01:03 AM
Are stm32 pullups strong enough for your I2C line?
>if there is an example to follow for the correct sequence of instruction to read from the thermal scanner connected in I2C
No idea, i suppose you googled it already, if i were you i would take one of those arduino/adafruit libraries and learn how they do it.
2021-11-08 02:08 AM
how do I know if the pin values are strong enough?
2021-11-08 02:18 AM
You could use a too strong pullup (low resistance value) and the chips are not able to write a 0 in the data/clock lines, or a too weak pullup (high resistance value) and the data/clock lines will look noisy and bumpy.
go to Melexis 90640 datasheet and try to find some of their typical configuration examples, take a look at the external pullups they use.
About the stm32 internal GPIO pullup https://electronics.stackexchange.com/questions/205666/stm32f4-pull-up-resistor-value
the value depends of the chip and the gpio pin. (datasheet again)
2021-11-08 02:19 AM
thanks now check
2021-11-08 02:58 AM
thanks, now I set the pins with high value I tested the project and it worked at the first test (with for to look for the value of the address of the device), the second test instead, (in which I entered manually and directly the address, since I know the default) immediately returns me an error could be a delay value to be set. I have already entered a delay of 10000 before starting reading.