cancel
Showing results for 
Search instead for 
Did you mean: 

I2C SDA line is pulled low by STOTG04E slave

RBans.1
Associate II

When we are trying to communicate with I2C module of STOTG04E device, we are seeing that after transactions SDA is pulled low by STOTG04E slave.

4 REPLIES 4
Ozone
Lead II

> ... we are seeing that after transactions SDA is pulled low by STOTG04E slave.

What exactly means "after the transaction" ?

The slave is supposed to pull down SDA as "ACK" during the 9th SCL clock cycle.

Here is what i mean by "transactions" :

1) start bit --> slave_addr->write_bit->ack (rcvd from slave)-->reg_addr (from where we want to red the data and in this case it is 0x00)-->ack( rcvd from slave) --> stop bit

start bit--> slave_addr-->read_bit-->ack (rcvd from slave) --> data_from_addr_0x00-->ack (rcvd from slave) --> data_from_addr (0x00+0x1) --> ack(rcvd from slave)--> ... addr is increamented by 0x1 and ack is recieved tii 20 such reads from slave.

But at the end of 20th transaction we see that SDA is low and SCL is high. We tried to give stop from master but it was not seen on bus.

So when bus is idle, shouldn't SDA go high?

Though we see the stop condition on bus at end of step-1, but when we try to send stop condition at the end of step-2, it's not seen on the bus.

RBans.1
Associate II

Sorry for it, it was a setup issue. It got resolved now.

Can you please direct me with the steps to follow right from powering up the chip to :

1) Configure it through I2C (i think it's already done but knowing a proper way would be appreciated)

2) Then use different USB modes

Is there anything we need to take care between step 1 and 2 so that from device switches from I2C to USB (and desired FS or slow speed or VP_VM or DAT_SE0) mode. I mean just configuring the register bits through I2C communication is good enough? Do i need to quit I2C 'mode' and switch to 'USB' mode is some way? Or i can simply program the control registers through I2C and one write is done do transactions on USB lines.

I have no experience with said driver IC.

> I mean just configuring the register bits through I2C communication is good enough?

I would assume so. By any means supported to interface and set all the config registers.

This should be described in the STOTG04E datasheet, albeit ST's reference docs seem to have become less and less comprehensible with the years ...

The I2C bus has mandatory pull-up resistors, and a SDL = SCK = H state is in stop mode.

As long as the MCU pins used for I2C are uninitialized (off/tristate by default) you are safe.