Custom I2C pins on STM32F103
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-05 8:09 AM
Hello,
I would like to implement an I2C master on an STM32F103. It's pretty straightforward to select the IO's using cubeMX and to generate the code, but I don't want to use either of the available pins for I2C (PB7,PB6 or PB9,PB8). I need to use PB5 as SDA and PB4 as SCK. Is there a way to do this in cudeMX/cubeIDE without writing a custom I2C ?
Regards,
Mawaba.
Solved! Go to Solution.
- Labels:
-
I2C
-
STM32F1 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-05 8:22 AM
No, this is not possible. In your case (I2C1) only the pins you mentioned can be selected.
BTW: with I2C2 you only have two pins, i.e. no alternatives.
When your question is answered, please close this topic by choosing Select as Best.
Good luck!
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-05 8:22 AM
No, this is not possible. In your case (I2C1) only the pins you mentioned can be selected.
BTW: with I2C2 you only have two pins, i.e. no alternatives.
When your question is answered, please close this topic by choosing Select as Best.
Good luck!
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-05 9:06 AM
Hello @Peter BENSCH​ ,
Thanks for the reply. I have a board here that is doing I2C on the same chip using PB5 & PB4. I do not have the source code and so I am trying to figure out how this could have been done.
Regards,
Mawaba.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-09 8:22 AM
Hello @Peter BENSCH​ ​ ,
Could I use those pins if I bit-banged I2C? If so are there any examples of i2c bitbanging for this chip?
Regards,
Mawaba.
