LS1012A - i2c slave mode

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

LS1012A - i2c slave mode

1,290 Views
nineteenalready
Contributor II

Is it possible to use current I2C reserver SDA, SCL pins for I2C Slave mode? e.g. I want to use ls1012a as the i2c slave. If the driver should be re-programmed, please let me know details or how can I use the unreserved GPIO 2 pins as i2c SDA, SCL and serve it as a slave?

Thanks

Tags (2)
4 Replies

1,100 Views
yipingwang
NXP TechSupport
NXP TechSupport
LS1012A master communicating to a slave thru I2C bus. during a read command the master gets reset (or the board hosting the master gets removed) and the slave was transmitting a bit (maybe the last bit) and that bit is zero (SDA line LOW).since the master is no ore providing the clock the slave stay in stuck driving SDA line to LOW.
now, the master restart to operate and it needs to get again control of the I2C bus. since the SDA line is forced low by the slave it is not able to proceed.the way to recover that is for the master to drive a train of clocks to force the slave to relinquish the bus (SDA lines).

1,100 Views
nineteenalready
Contributor II

Sorry for the late reply. Thanks, so AFAIU, the guy who asked this question in 2015, was going to use LS1021a (not a typo LS1012a) as I2C slave device as well, and he shared a part of the slave driver code.

Is there any open source code for the full version of i2c slave driver for LS1012a? I might find it a bit hard to write my own one, or I should refer to some related links that would be helpful. Thanks

0 Kudos

1,100 Views
nineteenalready
Contributor II

and also, if I installed Ubuntu 16.04 arm64, as described in NXP tutorial for this board, then this is the current i2c master driver, right?

https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-imx.c

And I need to remove the i2c master driver from kernel module and include my i2c slave driver, right? This will cause several components on boards (like accelerator) which use I2C master be dysfunctional which is OK,  I need to use LS1012a for SoC-to-SoC communication.

0 Kudos

1,100 Views
nineteenalready
Contributor II

Got the answer on my question here - https://community.nxp.com/message/1296050?commentID=1296050#comment-1296050 . Thanks

0 Kudos