This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C bus spikes

Hi Team,

These are the SDA and SCL lines of nRF52832 connected to a sensor. the clock frequency defined in the code is 400 KHz, but its coming as 200 KHz on oscilloscope. I think this is due to the weak internal pull up resistors. I believe this should improve if we add external pullup resistors. 

1) I know that the poor shape of the signals are due to weak internal pullup resistors. Can I ask you if this poor shape can cause reading wrong data ? For the first square (marked red), shows that the data is changing during the rising edge of clock. We are currently reading correct values, but is this prone to errors ? 

2) I sometimes notice noise on SDA line as shown in the above figure. Is it okay to notice such spikes during the negative cycle of clock ? Can this cause wrong data ? How can I avoid this ?

  • Hi,

     

    1) I know that the poor shape of the signals are due to weak internal pullup resistors. Can I ask you if this poor shape can cause reading wrong data ? For the first square (marked red), shows that the data is changing during the rising edge of clock. We are currently reading correct values, but is this prone to errors ? 

    Yes, this can cause errors in communication. You should consider either going to 100 kHz mode, or add stronger pull-up resistors.

    2) I sometimes notice noise on SDA line as shown in the above figure. Is it okay to notice such spikes during the negative cycle of clock ? Can this cause wrong data ? How can I avoid this ?

    You should add proper pull-ups and redo the scoping. This could be a edge detection on the slave side (ie. ACKing of the packet).

     

    Kind regards,

    Håkon

Related