cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone provide some reference or sample regarding i2c slave bitbang implementation in stm32

JMP.1
Associate II
 
13 REPLIES 13
Foued_KH
ST Employee

Hello @JMP.1​ ,

You can refer to the I2C WIKI : Getting started with I2C - stm32mcu

Hope my answer helped you!

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

S.Ma
Principal

I tried, using Timer and EXTI. It barely works at 200kHz if there is no other interrupt in the STM32.

So my piece of advice: Keep away from trying this.

thanks for your reply, this post is helpful when iam doing this i2c with hardware module support. i need to implement software i2c for slave

JMP.1
Associate II

Could you please share that code, i can just try atleast

Hello @JMP.1​ ,

Please check this link . It will help you to implement software I2C for slave.

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

S.Ma
Principal

Well, you have been warned.. STM32F437 code extract. EXTI on both SDA and SCL, plus a slave state machine interrupt based to grasp the I2C bus bit events, and a spy which put in BV (SW fifo) all the I2C seen events as an ASCII String.

S.Ma
Principal
 
S.Ma
Principal
 
S.Ma
Principal