AnsweredAssumed Answered

imx28evk i2c driver in slave mode

Question asked by Zaheer Ahmad on Jan 21, 2013
Latest reply on Feb 13, 2013 by PeterChan
Branched to a new discussion

Hi,

 

I am implementing i2c slave functionality and facing some problem at very initial level.

 

I have configured;

 

The slave address in I2C Control Register 1,

Set the slave mode in I2C Control Register 0 by clearing the "MASTER_MODE" bit

Enable the slave search engine by setting "SLAVE_ADDRESS_ENABLE" bit in I2C Control Register 0

Enable "SLAVE_IRQ_EN" bit in I2C Control Register 1

And run the module by setting "RUN"  bit in I2C Control Register 0


After the above configuration, I am able to get the start condition on bus and the status register shows that the i2c searching engine in busy "SLAVE_SEARCHING". But it does not generate the "SLAVE_IRQ" interrupt. By looking the bus state, the master is sending start + address but on slave side, it recognize the start condition and make the bus busy but does not received the address byte.

 

My question is, do I need to configure the DMA in this case so that it can receive the address byte?

 

 

The i2c controller on imx28evk runs in three modes, PIO, PIO queue and DMA mode.

 

Which mode is used in case of slave functionality?

Is there any reference code available in Linux of WinCE BSP for the i2c slave functionality?

 

Regards,

Zaheer

Outcomes