Forums - I2C driver configuration

3 posts / 0 new
Last post
I2C driver configuration
andreas
Join Date: 21 Oct 19
Posts: 34
Posted: Fri, 2019-11-29 05:07

Hi,

within the SDK it seems that the I2C master drivers are configured with the files DevCfg_master_fom_out_cdb.xml and DevCfg_master_devcfg_out_cdb.xml. Using this default configuration I was able to access a device using I2C1 instance (QAPI_I2CM_INSTANCE_002_E) with some code based on the I2C sample code from the API documentation.
When I change my code to access a device using I2C0 instance (QAPI_I2CM_INSTANCE_001_E) the code crashes.

I made my additions for I2C using the QCLI_demo setup.

Can someone explain how to configure I2C0 instance and why they are located in two different XML files (devcfg|fom)?

I need to use both I2C instances in FOM mode. When I move the configuration from devcfg.xml to the fom.xml I get a linker error: unresolved symbol I2CCoreConfig01_qca4020_devcfg_xml

Thanks,

Andreas

  • Up0
  • Down0
manjulak Moderator
Join Date: 5 Dec 14
Posts: 33
Posted: Wed, 2020-01-22 15:32

Rather than moving I2C configurations to fom xml file, did you check if I2C pins were conflicting with UART pins? If yes, can you please move UART to differnt pins and try using both I2C configurations.

  • Up0
  • Down0
andreas
Join Date: 21 Oct 19
Posts: 34
Posted: Thu, 2020-01-30 01:42

After revisiting this issue, I have to say that the problem disapeared somehow. Both I2C instances are working as expected with the default XML configuration. But there are still some unknowns on how to configure the I2C instances:


- why are they located in two different XML files?

- what are the possibilities for: clock_core_freq_khz, and what is the effect? If this is used to derive the I2C clock speed there are maybe some constraints?

- what is gpio_version in pu_scl_gpio_encoding good for (mentioned in help text)?

Thanks, Andreas

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.