Oscilloscope image of clock out on any xmega at 32MHz

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gents,

 

First, I want to apologize if this isn't in the correct forum.  I didn't see anything that really fit, so I put it in this forum as the question is being driven by the output of my atxmega128A3U's clock signal.

 

My scope is an OLD Textronix TDS544A.  Within the last year, I have pulled it apart and replaced all of the electrolytic capacitors in it.  And it passes all of the self-tests every single time.  When I connect any of the probes up to the probe compensation signal generator (0.5V 1KHz square wave) and look at the output at 1ms time division, I get the expected perfectly square output.

 

When I connect it to the clock output of my atxmega128A3U (pin E7 in specifically) at say 8MHz, I get a reasonable square wave with ringing on the rising and falling edges.  The problem is when I look at the clock when the board is running 32 MHz.  The output looks like a sinewave that has swallowed a square wave.  No ringing is evident either.  I would post a screen shot of the waveform, but that scope is old enough that uses a 3.5" floppy and I don't have one on any of my computers. 

 

I can think of a lot of different things that would cause the signal to look like that, unfortunately, one of them is the acquisition circuit is going out of tolerance.  Could I talk someone with a more modern scope to grab a screen capture of the clock out at 32 MHz so I can compare it to my scope?  I would really appreciate it!

 

Clint

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The waveform you describe sounds like low bandwidth.

 

Try this: With a moderately low square-wave frequency, say 2MHz or 4MHz, measure the rise and fall times. Make some effort to reduce the ringing by using the shortest possible connections to the signal source, especially ground. Make sure the IC is well bypassed. If you still have ringing, use as the 100% level the back part of the square wave. Now Bandwidth = 0.35/RiseTime. How does this value compare to 32MHz?

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim,

 

At 2MHz I used the cursors to measure from when it first started to rise to when it just overshot the normal high level.  It came in at 4ns.  That gives a bandwidth of 87.5 MHz, or 44:1 at 2MHz and nearly 3:1 at 32MHz.

 

To shorten things up, I removed the jumper wire I had the ground lead clipped too, which was inserted into one of the pins on the ground block on my board.  Instead, I removed the wire and the clip from the ground lead and plugged the ground lead directly into the ground on the PDI port and applied the probe tip directly to the MCU pin instead of going to the header (1 1/2" or so of wire) with another short jumper lead.

 

As for bypassing, I used the app notes as my guide (well, the parts that aren't screwed up!) so every power pin is bypassed, ferrite beads are used, etc.

 

At 2MHz, it looks like a good square wave, but it does have a bit of ringing (5ns or so).  I also reran it at 32MHz and the waveform looks a lot better.  The rise time is still 4ns (4.2ns measured) and it looks like it is critically damped as it rises above it once then settles down to the baseline voltage.  It looks MUCH closer to a square wave now and less like a union between the square wave and sine wave.

 

Clint

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I didn't quite understand how you are probing, but you should use very short distance and loop between signal and ground. Take a look at this video: https://www.youtube.com/watch?v=...

 

The signals on your board will depend also on bypassing and board layout, especially ground planes.

 

The old school way was to take a picture of the oscilloscope sreen.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is a picture from Teltronix TDS2012 (100 MHz). The chip is a xmega32a4 running at 32 MHz using internal 2 MHz and 16X PLL. The board has nothing but a regulator + bypassing caps. Its a double sided PCB with ground plane on both sides. The yellow channel is using the standard ground strap with allifator clip and the blue channel is the same, but using a spring for ground with a very small loop area.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jmaja1 wrote:

The old school way was to take a picture of the oscilloscope sreen.

 

We are SPOILED!  I never even thought of pulling out my phone...  Thanks!

 

The video was also a great reminder of things I technically "knew", but haven't really had to deal with for a while (mainly been playing with 8MHz megas and not looking at the clock).  So after watching the video, I redid the experiment at 32MHz.  The first shot is the original setup.  I had a 6" jumper wire clipped into the scope probe and the other end was plugged into the header at PE7.  The ground clip was clipped to a 4" jumper wire and the other end of that was plugged into the ground header.  That was a total of 10" of extra wire in the loop there:

Long ground lead setup

 

The output was the sine wave eating a square wave that got me so concerned to begin with:

Long ground lead waveform

 

After watching the video, I reconfigured things a bit.  First, I probed the pin PE7 directly with the tip of the probe.  Second, I found a 4" jumper wire (the shortest I had with female connectors on both ends) and plugged that directly into the probe as the ground lead.  This removed 8" of wire from the ground lead alone and 6" of wire from the signal path:

short ground lead setup

 

If I took the time, I could have made a 2" jumper for the ground lead, but this setup still gave me this waveform:

Short ground lead waveform

 

Please excuse the ugly image.  I forgot to turn off the flash and it had some ugly glare on it.  I Photoshopped much of it out (or at least removed the WHITE glare).  This waveform is much closer to what I was expecting to see.  I think I panicked when I first saw the waveform last night as the scope is fairly old (1996 Tektronix TDS544A).  I've recapped it last year and that made a HUGE difference in it's performance, but it is still nearly 20 years old...

 

Thanks for the help guys!  As always, it was very much appreciated!

 

Clint

Last Edited: Sat. Mar 14, 2015 - 06:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

THose long leads are probably a BIG part of your problem. You demonstrated that, above. At those sorts of rise times, even a 1" ground lead may be too long so some of that overshoot may still be in the circuit connection.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Unfortunately, that is almost as close as I can get.  The ground plane is on the bottom and covered in soldermask.  Thankfully, I am only using this to verify that the clock is doing what I think it should be doing (in this case, using the external 16MHz crystal and a 2x PLL).  I'm very new to the xmega world and I'm kind of back to square one (program it do what I THINK it should be doing, the plug it into the scope to make sure it actually IS doing that!)  I'm not NEARLY as comfortable with the xmegas as I am with the megas.

 

Going forward, most of the signals I will be probing will be much lower frequencies (PWM, I2C, etc.) and I will make sure I keep the ground lead short.  I'll probably go ahead and build up a 2" lead to cut the ground lead length in half.

 

Clint

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I couldn't stand it, so I made up a 1 1/2" (38mm) ground lead and retested it:

2 inch ground lead wavefor

 

Much better!

 

Clint

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have a really nice scope! The rise time seems to be clealy faster than the typical no load value of 4 ns in the datasheet. My scope doesn't show that fast edges correctly.

 

Certainly you can find ground closer than 38 mm from the pin you are measuring.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jmaja1 wrote:

You have a really nice scope! The rise time seems to be clealy faster than the typical no load value of 4 ns in the datasheet. My scope doesn't show that fast edges correctly.

 

I picked it up for a song off Ebay 8 or 9 years ago.  The display was messed up (optical gel had separated), so I bought it hoping the video output would work.  It did!  I plugged a 19" LCD into it and used it as such for years.  Last year or so when recapped it, I also pulled the display apart and cleaned out all the gel.  The display is now usable, if not quite bright enough.  That makes it a bit easier to use the on screen controls.  I REALLY need to have it fully calibrated (and my bench meter too while I am at it...), but I never seem to convince myself to part with the money and have it done!

 

Oh, and the rise time appears to be pretty close to 4ns.  The cursors on the last shot are right at 4.2ns, but the one bar is a bit before the start of the rise.

 

jmaja1 wrote:

Certainly you can find ground closer than 38 mm from the pin you are measuring.

 

I'm sure I could find a ground pin that would be closer, but then I would be probing two pins by hand (and knowing things can die if that big, fat probe shorts some pins out...) AND trying to take pictures of the screen with my camera at the same time.  Not enough hands and my feet just aren't that dexterous. 

 

Although, I had a grandmother who could probably operate that scope or my phone with her toes.  I know she could pinch the crap out of you with them!

 

Clint

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Isn't rise time defined typically as from 10% to 90%? That looks something like 2.5 ns from your last picture. The cursor is almost 2 ns before 10% point.

 

I got much sharper square with using just one channel. With one channel and very short (<10 mm) spring ground my scope reported 4.0-4.5 ns rise time. Adding the other channel to the same signal with a very short spring ground increased the rise time to bit over 5 ns and if the other channel was used with the standard 150 mm ground rise time of the channel with the very short spring ground became over 6 ns.

 

My 100 MHz scope has a rise time specification of 3.5 ns. As far as I know rise times sum as Tr_meas = SQRT (Tr_scope^2 + Tr_signal^2). If the signal would have 4-4.5 ns rise time, my scope should show 5.3-5.7 ns. When it shows 4.0-4.5 ns the signal should be 1.9-2.8 ns.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You know, the rise time IS a measurement I could just let the scope do, like you did!

 

Clint

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow!  You guys have nice scopes!

 

Another old "rule of thumb" was that to faithfully reproduce a signal one really wants to pass the primary frequency and the first 10 harmonics.

 

A square wave is truly the worst case scenario, with its infinite harmonics.

 

But, back to the real world, to "look nice and square", (i.e. faithfully reproduce the signal), one would want a bandwidth of 320 MHz for the 32 MHz signal.

 

Even a nice 100 MHz BW scope will therefore fall short on this test.

 

Bottom line: Know that the signal may be much better than the scope is capable of showing you.

 

JC

Last Edited: Sat. Mar 14, 2015 - 11:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

100 MHz isn't anything special nowadays. You can get a good new two channel one for $400. I bought mine for a bit more 7 years ago and it has been very usefull.

 

500 MHz is another story, new ones start from $5000!

 

For square waves the rise time may be crucial. The xmega has the same rise time on all frequencies so you may need that 300 MHz scope even if your fastest clock is 32K.