XMC_I2C Data Incorrect

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

cross mob
User19928
Level 1
Level 1
Hi

I am using the I2C_Master APP, it works fine, but occasionally incorrect data occurs. I have provided an oscilloscope and interrupt screenshots. You can see:
According to the results of the oscilloscope, the value is "FF,FC", and the decimal is 65532
According to the interrupt result, the decimal value is not 65532 (actually 65535)
I thought it was input interference, but the oscilloscope result was not like this. This happens approximately every 10-30 seconds, irregularly.

Thanks.
0 Likes
3 Replies
User19928
Level 1
Level 1
Hi
If I dissconnected ethercat link( yep i have use ethercat slave and i2c), then seems it works fine and never into break point.
Any suggestion? My i2c config is 400khz, interrupt mode, disable fifo, interrupt priority is 20, no error handling.
Thanks.
0 Likes
User8683
Level 4
Level 4
First like received
Have you looked at how long it is taking to service your interrupt? If it is long, it can sometimes mess with your communications. Also, if you are not configured to use the transmit and receive buffers, these are helpful for minimizing application level requirements.
0 Likes
User19928
Level 1
Level 1
Hi

Thanks for your reply.
I think i have found problem, The i2c pullup resister is too large. i have 2.2k pull up resister, and change to 1k( according https://www.ti.com/lit/an/slva689/slva689.pdf), it works.
Its so strange cuz when i use 100khz i2c communication with 2.2k pullup, it have same problem.

Anyway..change pullup resister to 1k then it works fine.

Thanks
0 Likes