This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Handling multiple slaves in a single I2C interface of DRA74xx



Hi All,

We have a DRA74xx based board which runs QNX operating system. In one of the I2C interfaces we have 2 slave devices connected .One is touch controller and the other one is keys controller. How  should the software to be defined in the QNX side system. We have some a linux sample driver given for the touch interface from cypress semiconductor. But we do not have any driver present for key controller. Do we have to write 2 separate QNX drivers.In DRA7xx qnx bsp we see an atmel  mtouch driver is present and it is  mapped to another display driver of qnx . We need to replace it with cypress driver and have to write a custom key

driver for qnx. Is it possible to write two device drivers  over a single i2c interface. Also what could be the recommended architecture to be handling these 2 slave devices in a single i2c channel.

With regards,

Jeyaseelan

  • Hi Jeyaseelan,

    Yes two different drivers, can control separate I2C devices on the same I2C bus.

    In the DRA74xx BSP, provided on qnx.com, in the sample build file provided (src/hardware/startup/board/dra74x/vayu-evm/build),  there is a an instance of the I2C driver started for each I2C bus that is used.  For example I2C bus 0 is launched with the following command:

    i2c-omap35xx-omap4 -p 0x48070000 -i 88 -c3 --u0

    This instance of the I2C driver (/dev/i2c0) can be used to communicate with all slaves on I2C0.

    There are examples in the BSP drivers of how the I2C driver can be used, see the src/hardware/mtouch folder for one example. 

    The documentation from QNX on the underlying software  interface is online here, or search on I2C in the QNX 6.6 documentation.

    Regards,

    kb

    .

  • Thanks KB for the reply.

    We are planning to use mtouch driver only for handling the touch coordinates coming from one atmel slave device(slave-1) . On the same channel another slave device is connected for key&knobs sensing (slave-2).

    Is it possible for us to open and read   (/dev/i2c0) for using  slave -2  address from user level application of qnx  while mtouch is using slave-1 from qnx driver level. Or any new custom qnx driver has to be for written for slave-1 .Kindly clarify it the above design approach results in any conflicts at the i2c0 channel.

    With regards,

    Jeyaseelan

  • There is a typo in previous post.

    Thanks KB for the reply.

    We are planning to use mtouch driver only for handling the touch coordinates coming from one atmel slave device(slave-1) . On the same channel another slave device is connected for key&knobs sensing (slave-2).

    Is it possible for us to open and read   (/dev/i2c0) for using  slave -2  address from user level application of qnx  while mtouch is using slave-1 from qnx driver level. Or any new custom qnx driver has to be for written for slave-2 .Kindly clarify it the above design approach results in any conflicts at the i2c0 channel.

    With regards,

    Jeyaseela

  • Hi Jeyaseela,

    Regarding "Is it possible for us to open and read   (/dev/i2c0) for using  slave -2  address from user level application of qnx  while mtouch is using slave-1 from qnx driver level. Or any new custom qnx driver has to be for written for slave-2".

    No additional S/W development is expected.  Please reference QNX I2C Documentation and the I2C driver included in the QNX BSP, under .../src/hardware/i2c.

    Regards,

    kb

  • Hi KB,

    Thanks for the clarifications.

    We just go ahead and develop user level application by opening /dev/i2c0 instance for slave-2, that is for keys & knobs.

    With regards,

    Jeyaseelan