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

cross mob
S960Q
Level 1
Level 1
10 sign-ins 5 sign-ins First question asked

Hello,

I have a XMC 470 Relax Kit which I'm trying to communicate with over I2C. As Dave 4.5 suggested I'm using Pin 5.2 as SCL and 5.0 as SDA. 

Code looks like this:

status = DAVE_Init();

if(status == DAVE_STATUS_SUCCESS)
{
XMC_DEBUG("DAVE Apps initialization success\n");
I2C_MASTER_Transmit(&I2C_MASTER_0,true,I2C_ADDR,&i2c_data,1,false);

while(tx_completion_0 == 0);
tx_completion_0 = 0;

}

 

Init is successful and then he stays in the loop. Measured with an Oscilloscope, the SCL and SDA Pins just staying high (due to 4.7kOhm pull up resistors). 

Are these Pins allowed? I could't find anything in the datasheet. 

 

Any help would be great.

All the best, 

Simon

0 Likes
1 Solution
Pradeep_PN
Moderator
Moderator
Moderator
250 sign-ins 100 solutions authored 25 likes received

Hi @S960Q ,

Greetings from Infineon.

Yes ,you can use Pin 5.2 as SCL and 5.0 as SDA which corresponds to the USIC2_CH0.
I see that most of your queries are answered by @JaydenCai .So please let me know if you have any further questions or concerns.

Best Regards
Pradeep.

View solution in original post

0 Likes
2 Replies
JaydenCai
Level 4
Level 4
25 replies posted First solution authored 25 sign-ins

Hello! I'll do my best to help you with your issue.

It seems that you are having trouble communicating over I2C with your XMC 470 Relax Kit. Based on the code you provided, it looks like you are using DAVE™ software to initialize the I2C interface and then transmit data.

Regarding your question about whether Pins 5.2 and 5.0 are allowed for use as SCL and SDA, according to the XMC 470 Relax Kit's datasheet, these pins can indeed be used for I2C communication. However, it's important to note that the pull-up resistors you mentioned should be connected to the I2C bus lines, not to the microcontroller pins themselves.

Since the SCL and SDA lines are staying high, it's possible that there is an issue with the I2C interface initialization or the transmission of data. To debug this issue, you may want to try the following:

  1. Check that the slave device is properly connected to the I2C bus and powered on.
  2. Verify that the correct slave address (I2C_ADDR) is being used in your code.
  3. Use an oscilloscope to monitor the SCL and SDA lines during transmission to ensure that they are changing state as expected.
  4. Try using a different set of I2C pins on your board to see if that resolves the issue.
  5. Make sure that the I2C interface is configured correctly (e.g., correct clock speed, addressing mode, etc.).

I hope this helps! Let me know if you have any other questions or concerns.

0 Likes
Pradeep_PN
Moderator
Moderator
Moderator
250 sign-ins 100 solutions authored 25 likes received

Hi @S960Q ,

Greetings from Infineon.

Yes ,you can use Pin 5.2 as SCL and 5.0 as SDA which corresponds to the USIC2_CH0.
I see that most of your queries are answered by @JaydenCai .So please let me know if you have any further questions or concerns.

Best Regards
Pradeep.

0 Likes