Hi everyone,
I am amar, now working with QN9080 Eval board. My aim is to read dps310 pressure sensor data by using
I2C Protocol, for doing this i used SDK2.2.2 from NXP, but i am confusing for deciding i2c0 or i2c1 for
connecting to sensor even though i know pin outs(PA08(flexcomm 1:I2C SCL) and PA09(flexcomm 1: I2C
SDA)) for i2c.
1) How can we decide whether i2c0 or i2c1?
2) What is the use of flexcomm1,2,3?
Thank you in advance,
amarr
Hi Amar, I hope you're doing well!
The choice of using I2C0 or I2C1 will depend mainly on which pins you are going to use in your design, as not every pin can be used for I2C0 or I2C1 functionality.
More information about this parts Pin Configuration can be found in chapter 7 of the QN908x's datasheet.
About Flexcomm, this is a peripheral which can be configured to work in some different modes, like USART, I2C, and SPI. Only Flexcomm 1 and 2 can be configured as I2C interfaces.
Please let me know if you need any more information.
Best regards,
Sebastián
Hi Amar,
Just as a quick correction, In the case of this device, the I2C interface is not numbered, as it instead depends on which Flexcomm interface is used for the I2C.
The choice is between either using Flexcomm 1 or Flexcomm 2, and the decision to use one or the other will depend on the pins which you wish to use.
To use pins PA12 and PA13, you would have to use the Flexcomm 1 interface configured in I2C mode, and the mux for pins PA12 and PA13 would need to be configured for the Flexcomm interface (in this case, Function 4 should be configured for this pin).
For more information, could you please take a look at table 95 of the QN908x User Manual, which can be found here?
Please let me know if you need any more information.
Best regards,
Sebastian