LPI2C unconditionally clock out byte?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPI2C unconditionally clock out byte?

950 Views
p_shep
Contributor IV

Hello,

Is there anyway to unconditionally clock out a byte on LPI2C? In that, even if the data line is held low by some other device, the clock line still toggles?

Been messing around with the driver, but it stead fast refuses to toggle the clock, if the data line is low.

Would the only option be to re-configure the clock like as GPIO and toggle it manually?

Thanks.

Labels (1)
Tags (2)
0 Kudos
Reply
3 Replies

906 Views
p_shep
Contributor IV

Thanks,

Yes, so in the case where a miss-behaving slave holds the data line low, can we clock out a byte (data unimportant) to try and get the slave to release the line.

From testing, if the data line is forced low, I can't get the I2C hardware to clock out anything... hardware refuses to send. Are there any tricks to force this?

The alternative is to change the clock pin mux from I2C to GPIO, and manually toggle the line 9 times to simulate a byte. But that would be a bit brutal. 

0 Kudos
Reply

897 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @p_shep 

 

Thank you so much for the clarification and for your patience.

 

Unfortunately, about what you are trying to do, there is no tricks to force it as far as we know, the only way that I think is to use the same I2C data line as an alternative in another pin, and enable the interrupts on another pin configured as GPIO, so it might disable I2C after an ISR occurs using some callback and then, you can re-enable I2C data line and toggle this GPIO, but you cannot connect this GPIO to I2C module, as they use different clock rates and different internal clocks feeders, so it is kind of impossible.

 

Hope it is helpful, thanks a lot again for your patience.

 

Best Regards.
Pablo Avalos.

0 Kudos
Reply

921 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Dear @p_shep 

 

Thanks a lot for being patience here and thanks a lot for reaching our community, I was assigned to assist you here.

 

Regarding your issue, let me see if I understood you well: you want to skip a byte from SDA in the transmission in a clock cycle ? Then, your SDA line is held low and clock signal (SCL) is stopping and does it never oscillates again ? I got confused with this too: "re-cReonfigure the clock like as GPIO and toggle it manually"

 

Hope you may clarify these points, I would like to help you with this. I will stay tuned.

 

Best Regards.
Pablo Avalos.

0 Kudos
Reply