Skip to main content
imichalev
Visitor II
September 25, 2012
Question

STM32 I2C sniffer

  • September 25, 2012
  • 2 replies
  • 2314 views
Posted on September 25, 2012 at 16:23

How to use stm32f100 to make I2C sniffer using inter-integrated circuit (I2C) interface? 

I've read all data sheet but don't find answer. Is there I2C mode selection used only for read data from i2c bus , the 'Slave receiver'  may be is the approach  mode but things not work.

Have you got any idea ?

    This topic has been closed for replies.

    2 replies

    frankmeyer9
    Associate III
    September 25, 2012
    Posted on September 25, 2012 at 17:36

    Quick guess: you will hardly find any example code.

    I2C is an adressed bus. You would have problems to record bus events that do not directly concern the sniffer, which are basically all ...

    You can use GPIO's in input mode, either with polling or interrupts on transition, and interpret the bus events internally.

    Tesla DeLorean
    Guru
    September 25, 2012
    Posted on September 25, 2012 at 18:13

    You can use GPIO's in input mode, either with polling or interrupts on transition, and interpret the bus events internally.

    That would probably make the mode sense. Using the STM32's I2C controller in any form or fashion would seem to increase the complexity geometrically. What you'd want is a ''promiscuous'' mode, but it doesn't have one. Things like logic analyzers would just look at and decode the signals.

    Often in the world of software/hardware development you can't just expect a ready-to-wear solution to be handed to you, if you're paid to come up with solutions, people usually expect you to figure it out and get it done.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..