Cannot interface SHT25 to STM32F4239I-DISC1 board BY I2C3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-26 11:06 PM
Hi there,
I have made the touch project by touchgfx and initiated the I2C3 by cubemx.
I am interfacing the SHT25 with STM32F4239I-DISC1 board BY I2C3. PA8 AND PC9.
I am using the command HAL_I2C_Master_Transmit and HAL_I2C_Master_Receive. but I cannot get the values from the protocol. Any help is required.
- Labels:
-
I2C
-
STM32F4 Series
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-26 11:29 PM
Use a sw bitbang first to get the fundation working. Check if the sensirion device has i2c protocol limitation in the past, they even provide drivers as workaround. Use low bitrate if there is a builtin mcu to convert analog sensor into a digital one. That is the case for sht30 for example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 12:32 AM
do you have any example for i2c3? because when i generate the code the i2c is configuring for memory interface only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 12:33 AM
or can i go for baremetal programming?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 1:31 AM
@Madhusudan​ "I cannot get the values from the protocol. "
Give more details:
- What, exactly, did you try?
- Do you have correct pullups?
- What debugging have you done to find what's wrong?
- Are you getting any error status returned?
- Can you do anything basic - eg, does the chip have an ID you can read?
- Are you sure you have the correct I2C address, and that you are presenting it correctly to the library?
- Have you used an oscilloscope to check what's happening on the actual wires?
- Have you checked that there's no conflict with other things on the Disco board?
- Have you tried a simple project with just the sensor - without TouchGfx?
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
‎2022-07-27 3:42 AM
there is no frequency on SDA and SCL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 3:43 AM
Yes address is correct, both pins are pullups and there si no conflict in Disco board they are free pins
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-27 4:02 AM
So that obviously explains why you can't get anything from the sensor!
Now you need to find out why there's no activity - most likely your STM32 configuration, or your external hardware - or both.
Are the lines stuck high or low?
Where, exactly, did you check?
Try checking directly at the processor pins with the sensor disconnected: if there's activity without the sensor connected, but that stops when it is connected - think what that tells you ...
These questions remain:
- What, exactly, did you try?
- Do you have correct pullups?
- What debugging have you done to find what's wrong?
- Are you getting any error status returned?
- Have you tried a simple project with just the sensor - without TouchGfx?
Plus:
- Can you get it to work on any other IC2 ?
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
‎2022-07-27 4:03 AM
@Madhusudan​ "both pins are pullups"
What pullups are you using, exactly?
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
‎2022-07-27 4:17 AM
@Madhusudan​ "address is correct"
How have you verified that?
Remember that it's not just a matter of knowing what the address is - you have to make sure that you present it to the libraries in the correct form:
https://www.avrfreaks.net/comment/1872781#comment-1872781
A complex system designed from scratch never works and cannot be patched up to make it work.
