Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I2C timing stm32

Rimvis123

Junior Member level 2
Joined
Oct 30, 2023
Messages
22
Helped
1
Reputation
2
Reaction score
0
Trophy points
1
Activity points
200
hello,

I'm new with I2C and I don't understand from where people are getting this 0x00707CBB timing adress in Stm32. I'm using Stm32wb55cgu6 and SCD-40 CO2 sesnor and i used this adress, everything works fine, but how to get it? Because when I just create and open stm32CubeIDE I only get 0x00000E14 timing adress.
 
Hi,

give complete informations:
Which people?
What source? (link?)
What makes you think it is an address?

****
On the other hand:
CubeIDE is made that a designer does not need to read to several thousands of pages of microcontroller documentation.

But if you want to go into details the manufacturer provides all informations. Like RM04343. It´s not hard to find if you g on the manufacturer´s website for the according microcontroller.

Klaus
 
Thanks for your answer. When i used google ant was typing "How to connect gas sensor with stm32 using I2C" I saw some issue request with codes in which I saw this number. Now for example you can see this number in codes like this (somebody had soome issues with I2C, but still there are 0x000707CBB. https://www.eevblog.com/forum/microcontrollers/stm32-i2c-with-hal-what-am-i-doing-wrong/
Here too :https://community.st.com/t5/stm32-m...-use-the-stm32l432-as-slave-while/td-p/114319
These are not links which I used to code, but these also have this number in I2C timing, so how they know, that you need exatly this? Stm32wb55cgu datasheet does not give this number, SCD-40 also. And yeah this is not adress, for example scd-40 0x62 is I2C adress.
 
Hi,

When i used google ant was typing "How to connect gas sensor with stm32 using I2C"
What answers do you expect with this question?
* Maybe someone has done exactly this and ... it will show you their code ... in best case with a little bit of documentation.

I - as a long term electronics designer - have a different view on the "problem":
I2C is a standard. The STM as well as the sensor has to keep on this standard.
Thus - for the STM - it does not matter what I2C device is connected.
Standard I2C clock speed is defined to be 100kHz. Each microcontroller needs to support this, each device needs to support this.
So just do a standard STM I2C setup and you are on the safe side .. independent of what I2C device you use.

***
ONLY if you want to leave this standard (but then you should tell: why), then you have to go deeper.
One reason may be that you need faster data transfer.
Then first have a look into the seonsor datasheet what spped it supports.
(standard mode: 100 kbit/s, full speed: 400 kbit/s, fast mode: 1 Mbit/s, high speed: 3,2 Mbit/s)
I dont´recommend to use different, non standard frequencies.

Again: these should be exceptions. If you chose a higher speed than 100kbit/s then you need to be sure EVERY I2C device on the bus needs to support this speed.

*****
It´s like learning a different language. And I2C is like a language.
You don´t learn to speak with "person x", you learn to speak "langage X"

For sure the meaning of the bytes depend on the I2C devices. But this has nothing to do with I2C interface setup within the STM.

I2C communication is always:
START | Save_Address RW | ACK | DATA | ACK | .... | STOP
and the meaning of DATA is the device specific part, everything else is just I2C standard.

Klaus
 
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top