This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why TWI can't work at 100k freq?

Hi dear engineers,

I have a strange TWI problem on my production protype which programmed based on the official twi example with softdevice s130_nrf51_2.0.1 and SDK 12.3.0. The device worked under a 16M XTAL HF clock and 32.768k Rail-2-Rail LF Clock. Nrf51822 TWI bus connects to 2 slave sensors with 2.8k pull-up resistors (I tried 10k, 4.7k before) and no internal pull-up GPIO setting. It's almost 100mm between the Master and Slave chips, and the wire have to go through FPC by 2 fpc connectors in the route.   

TWI works not very good at 400 freq, but much better at 250k with occasional commucation error . When I changed the freq to 100k so as to obtain a perfectly normal result, it couldn't work entirely!  I don't know what happened and how to calculate and set to other feasible freq.  Or maybe it is a flaw in my hardware design.

The twi signal wave shape from oscilloscope is as below:

(fig1. wave when 400k freq with 2.8k pull-up)

image when 400k freq

(fig2. wave when 250k freq with 2.8k pull-up)

image when 250k freq

Thanks.

Related