Wrong data on I2C 2 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-26 08:35 PM
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 ?
Thanks
- Labels:
-
I2C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-26 09:41 PM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-26 10:13 PM
............. I'd suppose the two halves aren't getting cleanly latched....
do you mean between expander and the LCD ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-26 10:14 PM
I reduced SCL to 50KHz, still got the same response, after GPS is on or accelerometer is on...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-27 06:20 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-27 10:45 PM
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 ..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-27 11:09 PM
Do the functions return an error status? The timeout would need to be accommodative of the amount of data you plan to transmit, and the bus speeds you are clocking at.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-28 06:07 PM
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...