Skip to main content
uli stone
Associate III
February 12, 2019
Question

No I2C Clock signal after Restart Condition

  • February 12, 2019
  • 12 replies
  • 5294 views

Hello,

I raised this problem in another topic I posted, but it is with another title and I'm not sure I will get there the help (title might be missleading).

I have the problem after sending Slave Address and Register Address and creating a start condition I don't get any clock signal from the STM32F4 microcontroller.

Hoch can I solve this?

Thank you0690X000006DUzQQAW.png

This topic has been closed for replies.

12 replies

Mon2
Senior III
February 15, 2019

Hi @uli stone​ . Sorry to jump in the middle of this dialog but is it important for you to use a step-by-step I2C handshake with your project? For example, why not apply the very powerful DMA feature of the I2C port using one of the working examples from CubeMX, etc. ? Most of the time, such examples can be working in a few minutes. The STM32F4 is very powerful and offer interrupt / DMA use to quickly send / receive data over I2C bus. You can also follow the examples to build an I2C slave using one of the kits.

Danish1
Lead III
February 15, 2019

If the I2C peripheral won't do it, then it presumably thinks it has reason not to do it.

Here's where it becomes something of a detective-game. You need to collect all the clues.

What I eventually had to do to sort out my I2C code was - whenever I was about to write to a control register - log the I2C status register(s), the time in microseconds, where I was in my code and what I was just about to do.

Those figures in the reference manual show master-read and master-write, with what events should happen to trigger each next step in your code. Sadly they don't show master-write-restart-read, or what might indicate failure so you can abort without waiting forever.