Skip to main content
antonius
Associate III
July 27, 2019
Question

Wrong data on I2C 2 ?

  • July 27, 2019
  • 7 replies
  • 2631 views

Dear Members,

I got a wrong data on I2C 2 for LCD, the first time it was ok, after a while it becomes like in the photo, what do you think the cause of it ?

I have put a pull up resistor for it 10K, and the speed is 100KHz,

I2C1 for Accelerometer and temperature,

Is it because of power supply or something else ?

Thanks0690X000009ZXuZQAW.jpg

This topic has been closed for replies.

7 replies

Tesla DeLorean
Guru
July 27, 2019

As I recall you have an IO Extender, with 4-bit connectivity, I'd suppose the two halves aren't getting cleanly latched.

Perhaps review with a logic analyzer, and review setup/hold timing requirements of the display.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
antonius
antoniusAuthor
Associate III
July 27, 2019

............. I'd suppose the two halves aren't getting cleanly latched....

do you mean between expander and the LCD ?

antonius
antoniusAuthor
Associate III
July 27, 2019

I reduced SCL to 50KHz, still got the same response, after GPS is on or accelerometer is on...

Tesla DeLorean
Guru
July 27, 2019

Ok, so you've established that the speed of the I2C interface isn't the issue. Now you need to review the performance of the signals to the display's micro-controller, and how the edges/transitions of those relate.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
antonius
antoniusAuthor
Associate III
July 28, 2019

when I make time out =100ms

HAL_I2C_Master_Transmit (&hi2c2, 0x7E,(uint8_t *) data_t, 4, 100);

it's reducing the error, is it the cause or something else ..?

antonius
antoniusAuthor
Associate III
July 29, 2019

I reduced SCL to 40KHz, it's now stablizing,

 hi2c2.Init.ClockSpeed = 40000;

I keep posted, perhaps, I need to reduce the clock lower ....Iet's see...