Error CyU3PMICSiInit I2C in CX3.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
cx3develop
Level 2
Level 2
25 sign-ins First like given 5 questions asked

Hi sir,

 

I am facing a problem about I2C in CX3.

My situation is as belows,

  - I am using a custom board.

  - the I2C bus has 3 slaves, eeprom, temperature sensor and FPGA(Image Sensor)

  - The I2C bus works fine (all slaves) when I comment out only CyU3PMICSiInit() from my application. If I insert CyU3PMIPicsiInit(), the function returns Err:0x4A. When taken with the oscilloscope, the ACK is not delivered. After reading the i2c FPGA value, it was always the same, but it was not the intended value.

  - i read the query below, but i think my situation is little different because I2C bus is working well without MipicsiInit().

https://community.infineon.com/t5/USB-superspeed-peripherals/CX3-AppInit-MipicsiInit-Err-0x4A/td-p/1...

 

Please help me.
Thank you in advance.

0 Likes
1 Solution

Hello,

The address for the MIPI Receiver block of CX3 is  0x0E(W) and 0x0F(R) and 0x0E is the address for FPGA as well. 

Please try using different slave address for FPGA

Regards,
Rashi

View solution in original post

0 Likes
5 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

When taken with the oscilloscope, the ACK is not delivered. After reading the i2c FPGA value, it was always the same, but it was not the intended value.

>> I didn't understand this.

Please confirm if there is no simultaneous I2C transfer initiated when CyU3PMICSiInit is called. Can you please comment off communication to other slaves and just call CyU3PMICSiInit. CyU3PMICSiInit API fails with error code 0x4a - CY_U3P_ERROR_FAILURE (i.e. When a transfer fails with an error defined in CyU3PI2cError_t). If yes, you can try calling CyU3PI2cGetErrorCode in the error handler of CyU3PMICSiInit and get the return value

Regards,
Rashi
0 Likes

Hi,

Thank you for reply.

Sorry, please ignore the mention that you didn't understand. 

There is no simultaneous I2C transfer when CyU3PMipicsiInit is called. At that time, there is no code to transfer to other slaves. And I tested for other slaves via implemented I2C Test Command by Uart Serial.  I2C master is only one (CX3). And I called CyU3PI2cGetErrorCode in error handler of CyU3PMipicsiInit and got Error code 0x00.  

cx3develop_2-1673945075483.png

 - Address: eeprom: 0xA0, temperature sensor: 0x9E, FPGA: 0x0E

I acquired the diagram below when i called CyU3PMipicsiInit(). What action is performed with I2C in the CyU3PMipicsiInit()?

cx3develop_1-1673943664589.png

 

Thank you

 

 

 

0 Likes

Hello,

The address for the MIPI Receiver block of CX3 is  0x0E(W) and 0x0F(R) and 0x0E is the address for FPGA as well. 

Please try using different slave address for FPGA

Regards,
Rashi
0 Likes

Hello,

aha,,, okay thank you. 

Could i ask one more question?  is not MIPI Receiver block an I2C Master? Why does the master need an address?

thank you

0 Likes

Hello,

Please refer to Figure 3 of CX3 TRM https://www.infineon.com/dgdl/Infineon-EZ-USB_CX3_Technical_Reference_Manual-AdditionalTechnicalInfo... for more details on CX3 I2C block and CX3 MIPI Receiver block

Regards,
Rashi
0 Likes