Clock ringing

Dec 23, 2011 14 Replies

I have several chips that use serial communication(There SDI/SDO's are all cascaded). To reduce the overall clock length feeding these chips(which would stretch 10's of inches) I fan the clock(split the clock line and spread out to each chip).



The maximum trace length from the uC to the furthest chip is about



10inches and there are a few stubs in between(very short stubs) .

I noticed that my clock lines were ringing pretty severly on both the positive and negative halfs. Everything seems to function properly but I'm wondering why they are ringing. The clock run about 1Mhz and the rise time is as fast as the uC handles it. On the scope I would say it's about 100ns or so.



I'm not sure if the scope is causing the ringing or what. I have another clock that has about a quarter of the trace length that looks to have identical ringing.



I did not terminate the lines since the calculations didn't warrant it. It was the whole reason I fanned out the clock to avoid a real long clock line which would have required termination(not a big deal but it would have also introduced skew). Maybe this wasn't such a good idea?



What I have essentially is severalines, two of which look like


+------*---+-------*------* | |
+------*
---+-------*------*

Where * are stubs(IC's) and the | are bridges. The clock enters from the left. I bridged the clock lines in the middle thinking it would help equalize the clock but maybe the difference in the two paths are creating some weird reflections.



The peak of the initial transient of the ring is close to 1/3 of the clock so it is rather significant.



When I get a chance I'll try to terminate the line and see if that helps but was interested in some of your thoughts while I wait.


What's the driver chip?

John

1: measure the clock line with the scope grounded as close to the clock as you can get it. Ideally you'd ground the scope right at the clock line -- most scope probes bring ground out close to the tip, and some have accessories that will let you do this easily. Just clipping the ground line onto the board within an inch or so of the clock should at least make a difference -- if the difference is marked, then your "clock glitch" may just be a scope probe issue. 2: if you can, limit the slew rate (or the current drive) at the microcontroller. Some will let you do this, some won't. Assuming that all of your loads are CMOS, limiting the current drive will just slow down the edge (and hence reduce reflections) without any circuit changes. 2a: consider a series resistor at the microcontroller. 3: 10 inches is long. My first experience with "why we should properly terminate clock signals" came when I was just a few years out of school, and involved an 68HC11 and a 74HC161 counter. Even though my clock line was only about 12 inches, I was still getting false clocks on the counter. One cruddy little resistor fixed that. 4: Have fun, and Merry Christmas.
My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com

Too much to run unterminated for modern logic parts.

Probably not. Here's why: Modern logic, and that includes modern uC, drive stuff at transition times in the low single-digit nanoseconds. This ain't grandpa's old 7400 TTL stuff no more.

So what to do now?

Tim's suggestion of slowing the transition times is one solution but you'd need a chip that can do this. Except for a few data line drivers most won't, at leat not down to where it needs to be for 10" line lengths.

AC-termination is one option: Calculate the trace impedance for each line, can be done from the Gerber and PCB fab data. At the end of each line, hang a a series combination of a resistor and a 33pF cap. The value of the resistor should equal the impedance you calculated which .. hopefully .. won't be too low.

Technically you should drive each line separately using a buffer, for example using a simple 8-bit bus driver. Those are cheap. The reason is that if the impedance is low and you have many lines this overwhelms the usual digital chip output. For example, a port pin of a MSP430 drives loads with roughly 30ohms of Rdson in its output devices. If you had five 100ohm clock traces in parallel that would be like hitching a 5-ton travel trailer to a Volkswagen Beetle.

Regards, Joerg http://www.analogconsultants.com/

P.S.: If the stubs are 1" or less don't worry about them right now. But if there's inputs with lots of load or capacitance hanging off of them, that would be not so cool.

Regards, Joerg http://www.analogconsultants.com/

I was thinking the same thing. It ain't the clock rate, it is the rise and fall times, and how many headaches could be alleviated by one little 'ol resistor.

The lone resistor isn't going to cut it because he drives several clock lines in parallel. So if each was 100ohms and you'd use only a resistor the five lines would be 20ohms. Then you could fry scrambled eggs on the driver chip :-)

Regards, Joerg http://www.analogconsultants.com/

what if that lone resistor is in series at the source, slowing down the edge just enough ..

-Lasse

Then you can end up with ringing going up and down the lines. The impedance presented to the source is a pretty bizarre one in this case.

But at this stage of the game the OP should just try what works best, AC-termination, series resistor, resonant this that and the other thing, and so on. I guess folks are already breathing down his back asking when they can ship it :-)

Regards, Joerg http://www.analogconsultants.com/

k
r

he

he did say it works just fine, it just looks bad on the scope

maybe there isn't really an issue, could just be the scope and probe playing with him, wouldn't be the first time smoething like that happend ;)

-Lasse

He wrote, quote "The peak of the initial transient of the ring is close to 1/3 of the clock so it is rather significant".

If that isn't a measurement error I'd certainly second that statement.

1/3 ring-back is a major concern. I would never release or ship something like that because it is most likely running on the edge.

Sure, but I assume he has also measured the clock at the source and saw a nice clean square. Then his scope hook-up would be ok, provided the probe is switched to 10x.

Regards, Joerg http://www.analogconsultants.com/

It seems it was the length of the ground clip on the probe. When I shortened it the clocks cleaned up nicely. No ringing at all from what I could tell.

How does an extra long ground wire on a probe cause ringing? In my case the ground points should be virtually identical(low current and big ground planes). Does this have to do with the 10x probe mentioned?

The ground lead is an inductor and the scope cannot be considered grounded for RF purposes. This puts the ground lead inductance in series with your measured signal.

Hint for next time: Always measure the clock at the source as well. If it's ringing the same as at the far end then there is very likely a problem with the measurement setup.

Also, make sure you have a scope of 200MHz bandwidth or more, depending on how fast your transitions are. With a scope of too little bandwidth it can happen that everything looks ok on screen but in reality it isn't.

Regards, Joerg http://www.analogconsultants.com/

Yep. I guess maybe some type of AC or active termination (???), but if he is going to tack that much crap on, he might as well figure it out and respin the board to include the termination he wanted to avoid.

Ah, after I posted, I saw that indeed it was his scope set up. That can get ya'.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required