cancel
Showing results for 
Search instead for 
Did you mean: 

I2C3 Slave need to re-power to work

ketan_vd
Associate

Hi All,

I am Ketan, and I am implementing own driver for STM32F4 device. I have STM32F4-DISCO Development, everything looks fine when I2C talks on-board slave device (CS43L22) but when I2C talk to external slave, which is connected thorough Jumper wire, it seems start condition not able to generate. most of time, I switch off the external slave and switch on, then works fine. but without power off external slave, looks start condition is not able to generate. I am not suspecting driver issue, because on-board slave device address able to read.

3 REPLIES 3
TDK
Guru

Some possibilities:

  • Ensure external pullups are present.
  • Ensure board is powered.
  • Ensure pins are connected correctly.
  • Ensure slave address is correct. It should be left-shifted.
  • Use a logic analyzer to see what is happening on the line.
  • If bus is interrupted mid-transaction, slave could be stuck. Toggle SCL 9 times as a GPIO to reset the bus.
If you feel a post has answered your question, please click "Accept as Solution".
ketan_vd
Associate

Hi,

Thank you for reply. as I mention, external slave device also working fine but only when restart the power cycle. that means pins are connected correctly, board is powered, slave address is correct. 

I feel, I didn't connected external pullups register but instead off, I am using GPIO pullups configuration while initializing the pins.

Debug the code, figure out why it's not working, or at least how. Do HAL functions return HAL_OK? Where in the process does the code fail? Perhaps show some code. Are you respecting startup times? Do you have a logic analyzer to further debug?

> I feel, I didn't connected external pullups register but instead off, I am using GPIO pullups configuration while initializing the pins.

I can't decipher this. Does this mean external pullups in the region of 1-5 kOhm are present or not?

If you feel a post has answered your question, please click "Accept as Solution".