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.

AM2612-Q1: Some questions about CDD_I2C blocking transfer API

Part Number: AM2612-Q1

Hi team,

I ask this for my customer

For the AM261x MCAL CDD_I2C driver, we only found the asynchronous transfer API Cdd_I2c_AsyncTransmit(). We did not find a public blocking or synchronous transfer API.

Could you please confirm:

  • Is a blocking transfer API available?
  • If not, is this the intended CDD_I2C design?
  • For RTOS applications requiring synchronous behavior, should we wrap Cdd_I2c_AsyncTransmit() with a semaphore/event, or use polling mode with Cdd_I2c_MainFunction()?
  • Is a blocking API planned for a future release?

BRs

Shuqing

  • Hi Shuqing, 


    Is a blocking transfer API available?

    -> There is no blocking API available for I2C transfer within the MCAL offering. 

    If not, is this the intended CDD_I2C design?

    -> This a decision taken during the driver design. All I2C transfers are asyn and the completion is signaled by a notification. 

    For RTOS applications requiring synchronous behavior, should we wrap Cdd_I2c_AsyncTransmit() with a semaphore/event, or use polling mode with Cdd_I2c_MainFunction()?

    -> I would recommend using the semaphore with Cdd_I2c_AsyncTransmit(). You can post the semaphore in the completion or error notifications. 

    Is a blocking API planned for a future release?

    -> Unfortunately, a blocking API is not planned for in the future.  



    Let me know if you have follow up questions or need a more detailed explanation. 



    Regards, 
    Pranav Siddappa

  • Hi Pranav,

    The reason customer asks for this API is that TI's Pmic_wdgQaWriteAnswer()  (pmic_wdg.c, around line 758 in https://github.com/TexasInstruments/PMIC-RTOS-DRIVERS) performs question read, calculation and answer write in one synchronous sequence. A blocking I2C API would make this use case much simpler. It would be helpful if TI could consider supporting it in the future.

    BRs

    Shuqing

  • Hi Shuqing, 

    We have similar examples in our I2cApp within MCAL offering. The situation is quite similar; one transfer, delay for processing data followed by another transfer. Both the EEPROM and Temperature sensor examples have an application level delay for processing. 

    In these the blocking aspect is taken care of in the application rather than the driver. 

    Regards, 
    Pranav Siddappa