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.

I2C peripheral working in DMAInterrupt mode

Hi, I have been programming i2c peripheral in my own C6747 board using psp from TI. Up to now the i2c can work correctly by working in interrupt mode. But it can not output the right result while working in DMAInterrupt mode. By the way, the function, GIO_submit return the IOM_complete value, and the EDMA3's handle has also been obtained successfully. Could anyone give me some explain? Thanks

  • Tagged for escalation to BIOS PSP team...

  • Which version of the BIOS PSP driver is used?

    hao zhang said:

    But it can not output the right result while working in DMAInterrupt mode.

    "not output the right result" -- does it mean that bytes are not transferred at all? OR the bytes are transferred but the data is mismatched? OR there is some issue at the protocol level, like the stop bit is not generated, nack is generated etc?

    hao zhang said:

    GIO_submit return the IOM_complete value

     

    Since GIO_submit is returning with IOM_COMPLETED, the driver/GIO layer seem to be functioning properly.

    Can you be more specific in the error you are seeing. Like what is being transferred and the exepcted result and the observed result.


     

  • actually, i want to set and read a real-time clock chip by i2c prepheral. both setting and reading are done by calling GIO_submit function. Both return the IOM_complete flag. But after reading operation, the buffer i used to store the reading result kept unchanged, namely no results return. I have put the buffer into the I2c_DataParams structure, and the buffer can obtain correct result in interrupt mode.

  • Sriram said:

    "not output the right result" -- does it mean that bytes are not transferred at all? OR the bytes are transferred but the data is mismatched? OR there is some issue at the protocol level, like the stop bit is not generated, nack is generated etc?

     

     

    it means that bytes are not transfered at all.  I use the same protocol as your PSP example, such as generated start stop bit. and I can obtain the correct result only if no-DMAInterrupt mode

  • Sriram said:

    Which version of the BIOS PSP driver is used?

    the latest version of the BIOS PSP driver, namely 1_30

  • Can someone give me some possible advice? thanks

  • Hi,

    I need some more information on this from you.

    1. My understanding is that the PSP driver version being used is "01.30.00". please correct me If I am wrong.
    2. Can you please attach the specification document for the RTC you are using.
    3. I hope that the settings being used are the default settings available in the example and no settings are changed(e.g. "enableCache" is by default to TRUE).
    4. Also it would be helpful if you can attach the code used for the I2C - RTC  communication.

    Thanks & Regards,
    Imtiaz SMA

  • tanks for your reply. The question has also been disturbing me

    Imtiaz SMA said:
    My understanding is that the PSP driver version being used is "01.30.00".

     

    the version is 01_30, acturally

     

    Imtiaz SMA said:
    Can you please attach the specification document for the RTC you are using

     

    the RTC is ISL12026.

    Imtiaz SMA said:
    the settings being used are the default settings

     

    You mean the build setting, don't you? If so, i'll say yes. for I set the debug options following your PSP datasheet

    Imtiaz SMA said:
    attach the code used for the I2C - RTC  communication

     

    I'll send you my code.

     

    thanks very much.

    myI2C.rar
  • Hi,

    Regarding the code version, i wanted to know the version of code installed on your
    machine i.e. in your installation folder the version of the package would be mentioned
    like pspdrivers_xx_xx_xx i would like you to confirm if this is pspdrivers_01_30_01. if not
    please update to the latest version (i.e. pspdrivers_01_30_01).

    i have gone through your code and following are my observations.

    1. The ouput clock frequency is configured to be 1MHz, the maximum bus frequency
       supported for the i2c bus is only 400KHz. i suggest that you configure the
       i2c at lower frequency(e.g 100KHz) for testing.

    2. The specification of RTC mentions that all the 8 RTC registers should be written
       in a single sequence(page 12). But i observe in the code that each register is written
       in a sequence of operations. can you please confirm if this is in conformance to
       the RTC specification
      
    Regards,
    imtiaz

  • Imtiaz SMA said:
    The ouput clock frequency is configured to be 1MHz, the maximum bus frequency
       supported for the i2c bus is only 400KHz. i suggest that you configure the
       i2c at lower frequency(e.g 100KHz) for testing.

     

     

    correct!

     

    thank you very much