cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use i2c in a full duplex mode?

Manjunatha S
Associate II
Posted on September 07, 2012 at 08:09

Hi! all,

Is it possible to use i2c of stm32l152rbt6 in a full duplex mode? if so can you post/send me the relevant code for that.

thanks, 

#i2c-in-a-full-duplex-mode #i2c-fundamentals
7 REPLIES 7
frankmeyer9
Associate II
Posted on September 07, 2012 at 08:24

Is it possible to use i2c of stm32l152rbt6 in a full duplex mode?

 

No. The i2c bus has generally no duplex mode.

There is just one SDA line.

Maybe you mean SPI ?

Manjunatha S
Associate II
Posted on September 07, 2012 at 15:13

thank you for your reply.

not SPI, i am asking about I2C only. i performed transmission between master and slave ie. master transmitter and slave receiver. now i need to do reverse of it, ie. slave transmitter and master receiver. there is a procedure in stm32l1xx.h(header file) and st's reference manual  but i am not understanding that.

emalund
Associate III
Posted on September 07, 2012 at 16:34

i performed transmission between master and slave ie. master transmitter and slave receiver. now i need to do reverse of it, ie. slave transmitter and master receiver. there is a procedure in stm32l1xx.h(header file) and st's reference manual  but i am not understanding that

 

 

the usual reason for not understanding the I²C slave to master transfer is thinking ''slave transmitter''.

in I²C ONLY the master initiates things

read the docs again, but this time think master transmitte and master reader

Erik
frankmeyer9
Associate II
Posted on September 07, 2012 at 16:35

The stm32 can certainly work as master or slave.

But i2c is not spi, there are no separate data connections.

The master clocks the bits in or out, but both at the same time, i.e. duplex transmission, is not possible.

Posted on September 07, 2012 at 22:14

I'm afraid you may not understand how I2C actually works.  Please read:

http://i2cbus.com/i2cbasics.html

...and the current I2C spec.

Posted on September 07, 2012 at 22:55

''duplex transmission, is not possible''

 To be precise, I2C is half-duplex;  full-duplex is not  possible.

I2C Specification:

http://www.nxp.com/documents/user_manual/UM10204.pdf

frankmeyer9
Associate II
Posted on September 08, 2012 at 14:47

To be precise, I2C is half-duplex;  full-duplex is

not

possible.

 

Well, I used ''duplex'' as synonym for ''full duplex''.

Stating that there are no separate connections (like MISO and MOSI for SPI) should have made it clear.

One would assume some interest at the side of the poster to look up for the background, to understand the problem. That well includes the standard paper in this case.