I2C not working with STM32F103C6 and STM32F103C8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-18 06:00 AM
we have been trying to get the I2C up on both the controller and no responses from anyone the cubeMx issue if I2C is really a problem..Kindly respond as we are trying to get I2C up ..
requesting the experience forum experts to respond.
Thanks
Ravi
Solved! Go to Solution.
- Labels:
-
I2C
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-22 04:47 AM
yes absoulutely...3V3 ..we are seeing high...4K7 pulls up ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-23 08:04 PM
Hi,
As I was continuing with my effort to read the sensor values using C8...I observed that when I do the HAL_write and HAL_Read...there seems to be values which are not coming out of sensor properly..
attached is the code for the same.I am seeing values like dd, dd once I read from the memory.
HAL_write is passing..I am comparing the same result with Rpi when I connect the sensor..so it is not matching with Rpi..Let me know your thoughts on this.
Thanks and regards
Ravi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-23 08:13 PM
also would like to add..according to the sensor doc ...there is CRC start...so we need to add this??..
I also added the same but did not seem to make much difference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-23 08:39 PM
when I do I2C_Mem_write it passes..but not I2C_Master_Transmit??...anyways I am not getting the intended answer in the buffer...thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-23 11:01 PM
It's time to take the logic analyzer out of the drawer and look at the bus to see what's going on there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-24 02:00 AM
yea, i said 3 days ago:
if still not working - its time, to look at the signal:
take DSO, 1 ch sck , 1 ch sda ; trigger on clk.
then show, what happens on I2C lines.
but he prefers to play blind cow . :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-24 02:48 AM
Hi,
sorry I had updated ...I2C is working fine...and I am also able to get the version of the sensor fine.
After which I am trying to read the status ready ..where I am not seeing the flag .
if I just enable version number all is fine..but when I try to get the get ready flag there seems to be problem...more to do with I2C_Mem_write and Mem_read...any suggestion with the way it is called kindly let me know.
Thanks
Ravi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-24 02:51 AM
it looks more a pointer management issue I guess...I am able to get the version number of the sensor fine if I run only that..but when I enable get ready flag ...even the version number values changing..
let me know..
If I get this properly I will be able to read the perodic mesurement as well as the actual values from sensor...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-24 03:10 AM
try...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-24 03:37 AM
Hi,
I tried with this which says
only dddd
but after start periodic measurement need to check for data ready??
anyways will try that also..not getting the values....let me know the change