CONFLICT WHEN USING I2C1 STM32F4 DISCOVERY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-30 2:14 AM
I use STM32F4 Discovery, and when using I2C1 for communication, I encounter a situation where the chip becomes unresponsive while using UART and during operation with I2C1. When I use other I2C interfaces, it works normally. I want to understand what is causing I2C1 to make the chip unresponsive.
When I use other I2C interfaces, the response is only within 100ms, but when using this I2C interface, the response takes several seconds
thanks you
- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-30 3:59 AM
Have you checked the board's User Manual and/or Schematics to see if there's anything else on that pin?
Example just now:
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-30 9:35 AM
Hello @bacnk
Make sure that there are no resource conflicts between I2C1 and other peripherals and that I2C1 is correctly initialized and configured in your code.
I advise you to enable timeout register and use an oscilloscope or logic analyzer to monitor the I2C bus.
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-01 8:28 PM
I use stm32f4 discovery kit, I configure i2c 2,3 similarly but when using i2c 2,3 it is normal, but when using i2c1 I have the problem of slow response chip. I use uart to check response time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-01 9:25 PM
I use resistor connected to 3v3, do I need to configure pull up in the code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-02 12:44 AM
> I use resistor connected to 3v3, do I need to configure pull up in the code?
No, but the value of the external resistor matters, together with its capacitance.
> the chip becomes unresponsive while using UART and during operation with I2C1
Which chip? How do you know it's unresponsive?
Do you observe the SDA/SCL signals using oscilloscope or logic analyzer (LA)?
As @Imen.D pointed out above, there may be pins which are already used on the board. In particular, I2C1_SDA can be on pins PB7/PB9, I2C1_SCL on PB6/PB8, but note, that is on-board I2C device on PB6/PB9 (the CS43L22 audio codec) so if you use these pins, note that the on-board I2C device may interfere. See manual and schematics of the Disco board.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-02 2:34 AM
Again, have you checked the board's User Manual and/or Schematics to see if there's anything else on those pins?
ie, have you checked for conflicts on the board?
Use an oscilloscope to see what's actually happening on the wires.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-02 2:35 AM
Please show a schematic.
Trying to describe electronic circuits in text is really ineffective - that's why we have schematics!
A complex system designed from scratch never works and cannot be patched up to make it work.
