I would suggest switching to a quartz crystal on one of the boards just to see if it works. I've never been able to get a Propeller to work with a ceramic resonator at all. The 6pF load cap. that Leon mentioned is probably the reason it fails.
It does seem like a capacitance issue, and one has to realize that those CSTCC resonators have built-in capacitors which add in parallel to the capacitors supplied by the Prop itself. Too much loading? Maybe try a resonator that does not have built in capacitors. For example the Panasonic EFO series or from the PBRC series from Kyocera/AVX.
Leon, it has to be qualified that 6 pF you mentioned is xtal mode 00, the pad capacitance only, mainly intended for external drive, and the Xout resistance is infinite in that mode. Xtal mode 01 is for 4 to 16 MHz operation with Crystal/Resonator, and the Prop data sheet does mention resonator explicitly there (page 14). In xtal mode 01, the Prop internally loads the input and output with 36pF capacitors, for an overall load in series of 18pF, and Xout resistance is 2000 Ω.
It seems that all the focus has been on the clock source (crystal, resonator, internal R/C) and also on the EEPROM. Have you looked into possible issues with the RESET line?? How is that wired? Is there a pull-up on that line? Do you use a Prop plug for programming or is there on onboard FTDI chip?
The smallest 5MHz xtal I've found is the JXG75 from Jauch. It is the one at 9am in the attached photo, just above the QFN prop. It is a 5mm x 7mm package, about the same footprint as an soic8. It is more like $0.70/1k, not $0.30.
Yes, it definitely has to do with the type of resonator used. The next thing I have to find out is wether the "bad" crystals are just damaged or if the load capacitance or loop gain is very close to the limit so that a small tolerance can cause it to fail. Once I had a problem with my pick&place machine smashing the fragile crystals because it has no real motor for the vertical axis but only a solenoid. But this time it can't be that because I mounted them manually.
Thanks for the JGX75 proposal. $0.70 is bad but of course much better than trouble.
Ok, I've replaced the crystals of the bad boards and all work, now. I don't know for sure if the propeller has a problem with ceramic resonators in general, if the bad ones were just damaged or something was out of spec or not properly designed.
I decided to replace the ceramic types with true quartz crystals on the next board revision. However, throwing away the current stock would be too expensive. Instead, I'm going to test each oscillator ciruit if it starts up within less than 200µs. That seems to be a good indication of it working reliably. So I think the issue can be considered solved.
Ok, I've replaced the crystals of the bad boards and all work, now. I don't know for sure if the propeller has a problem with ceramic resonators in general, if the bad ones were just damaged or something was out of spec or not properly designed.
I decided to replace the ceramic types with true quartz crystals on the next board revision. However, throwing away the current stock would be too expensive. Instead, I'm going to test each oscillator ciruit if it starts up within less than 200µs. That seems to be a good indication of it working reliably. So I think the issue can be considered solved.
Ok, I've replaced the crystals of the bad boards and all work, now. I don't know for sure if the propeller has a problem with ceramic resonators in general, if the bad ones were just damaged or something was out of spec or not properly designed.
I decided to replace the ceramic types with true quartz crystals on the next board revision. However, throwing away the current stock would be too expensive. Instead, I'm going to test each oscillator ciruit if it starts up within less than 200µs. That seems to be a good indication of it working reliably. So I think the issue can be considered solved.
That does beg a question that needs to be answered, and is not yet resolved IMO. Others in this thread reported poor results with resonators. I'd put my bet on the importance of having the correct load capacitance on the resonator. I still believe that will entail using a two-terminal resonator without built-in capacitors. At Parallax, John Barrowman used to be the go-to guy for questions about resonators. If you hang a 10x low capacitance scope probe on the oscillator output, the oscillation should have a sinusoidal appearance almost the full Vdd - Vss amplitude, but not clipped into a square wave. Test that with both cold spray and a heat gun. A resonator should certainly start up in 200 µs.
ManAtWork, I have a reel of the JXG75 5MHz crystals, 18pF load, so PM me if you would like to try it out. These were special order from Jauch.
I just exchanged 3 of the crystals on the bad boards with new ones. They immediately worked without problems. The bad ones need remarkably longer to startup oszillation (200..500µs) whereas the good ones startup <150µs. And I had a very strange phenomenon, again. One of the bad boards magicaly cured after pressing the probe tip several times on the pins. Maybe it has to do with mechanical stress (sometimes due to thermal expansion)?
Did it also flip start up speed as it 'fixed' ?
I'd be worried about field themal cycling failures, if it is this sensistive, and 'bipolar' in nature.
Especially if slower start, seems to flag failure to come out of boot properly. That slower start time, is still faster than a crystal.
Sounds almost like more than one fault here ?
If the CerRes has the built in caps, then I'd expect them to need disable in the Prop, but you may need a slight increase in Rs at low frequencies for best start-up.
Rather than a boot failure, I'd call this a boot hand-over failure, as the EE read is from internal osc, and it cannot set/select the Xtal mode, until after boot and it starts executing first code.
Do you have a watchdog ? Perhaps more options/checking/delays on the hand-over process can make it more rhobust ?
That does beg a question that needs to be answered, and is not yet resolved IMO. Others in this thread reported poor results with resonators. I'd put my bet on the importance of having the correct load capacitance on the resonator. I still believe that will entail using a two-terminal resonator without built-in capacitors.
Or, a correct Rs when using a lower C setting ?
It should be possible to use 3 terminal CerRes, but I'd agree not with the 36pF internals and 2000 ohms, as well.
You can also use a low capacitance diode to check with a voltmeter the p-p swing on the Xtal IN.
Gnd & +ve diodes for +peak, and Vcc& -Diode for -peak.
Use this to check how much change a scope probe causes, so you can adjust for that.
This is the startup of o good board with the probe at the XIN pin.
For comparison, this is a bad board. Without the probe it doesn't reliably start up but with the probe it does. My probe is a 1:10 type rated 13pF. When I measure the capacitance with the LCR meter it tells me 10pF. CLKMODE is XTAL1 + PLL16X. I also tried XTAL3+PLL16 which theoretically should work better due to the resonators internal Cs but it didn't make much difference. As jmg said, maybe I should additionally adjust the driver resistance (R) as the propeller can't select resistance and load capacitance independently.
This is the detailed view of the XIN signal. It is an almost perfect sine wave with ~2.5Vpp amplitude.
These are the XIN (trace#1) and XOUT (trace#2) signals sampled simultanously. XOUT is a bit distorted but I think ok. Phase shift is near 180°.
@all: Sorry, PM didn't work as it was switched off. It should work now.
Without the probe it doesn't reliably start up but with the probe it does.
Sounds like the Osc never actually starts, without the 'helper C'.
Series R can help check Osc Margins, as too can parallel damping resistances. ie you can make boards, then check some extra loading is still OK, before production release.
Did you try flipping the CerRes, just in case the pins are not identical ?
Are those last CRO plots, with the higher or lower internal C settings ?
Ok, I think I have the final solution. When I add a 15pF cap to between XOUT and ground even the "bad" crystals startup oscilation reliably in only 100µs. (before: good = ~150µs, bad = >200µs) I decided to add that cap to all and not only the bad boards to have some safety margin. I'm also thinking about keeping the ceramic resonators instead of replacing them with a quartz crystal and only adding the capacitor to the next layout revision, if no further problems show up. This way I could even keep the top side layout and paste stencil and only add one 0805 part to the bottom side. Saves a lot of work and money.
Ok, I think I have the final solution. When I add a 15pF cap to between XOUT and ground even the "bad" crystals startup oscilation reliably in only 100µs. (before: good = ~150µs, bad = >200µs) I decided to add that cap to all and not only the bad boards to have some safety margin. I'm also thinking about keeping the ceramic resonators instead of replacing them with a quartz crystal and only adding the capacitor to the next layout revision, if no further problems show up. This way I could even keep the top side layout and paste stencil and only add one 0805 part to the bottom side. Saves a lot of work and money.
Adding C has a similar Phase Effect, as the increasing Series R I suggested above, so you might like to allow both options on a revised PCB.
Series R will have less impact on operating frequency.
More C on the XOUT, also increases the voltage swing on XIN.
Comments
EDIT: I see that it has worked
Robert
Thanks for the JGX75 proposal. $0.70 is bad but of course much better than trouble.
I decided to replace the ceramic types with true quartz crystals on the next board revision. However, throwing away the current stock would be too expensive. Instead, I'm going to test each oscillator ciruit if it starts up within less than 200µs. That seems to be a good indication of it working reliably. So I think the issue can be considered solved.
(I helped by not commenting till the experts had spoken).
Everybody who (seriously) contributed to the discussion (no matter if his guess was wrong) can apply for a free sample via PM.
I told you so!
sending you a PM does not work. So I'm asking the question here in the forum.
what is the price of this steppermotor-control? 10A @80V is not often found for steppermotor-controls. Most of them go up only to 48V.
would you mind posting your website? If not publicly would you mind sending me a PM?
thank you very much in advance
best regards
Stefan
http://forums.parallax.com/showthread.php?129448-Prop-based-CNC-3D-printer&p=975521&viewfull=1#post975521
One or two of your controllers would fit nicely, if you are interested in selling a couple more.
Please PM me as well.
That does beg a question that needs to be answered, and is not yet resolved IMO. Others in this thread reported poor results with resonators. I'd put my bet on the importance of having the correct load capacitance on the resonator. I still believe that will entail using a two-terminal resonator without built-in capacitors. At Parallax, John Barrowman used to be the go-to guy for questions about resonators. If you hang a 10x low capacitance scope probe on the oscillator output, the oscillation should have a sinusoidal appearance almost the full Vdd - Vss amplitude, but not clipped into a square wave. Test that with both cold spray and a heat gun. A resonator should certainly start up in 200 µs.
ManAtWork, I have a reel of the JXG75 5MHz crystals, 18pF load, so PM me if you would like to try it out. These were special order from Jauch.
Did it also flip start up speed as it 'fixed' ?
I'd be worried about field themal cycling failures, if it is this sensistive, and 'bipolar' in nature.
Especially if slower start, seems to flag failure to come out of boot properly. That slower start time, is still faster than a crystal.
Sounds almost like more than one fault here ?
If the CerRes has the built in caps, then I'd expect them to need disable in the Prop, but you may need a slight increase in Rs at low frequencies for best start-up.
Rather than a boot failure, I'd call this a boot hand-over failure, as the EE read is from internal osc, and it cannot set/select the Xtal mode, until after boot and it starts executing first code.
Do you have a watchdog ? Perhaps more options/checking/delays on the hand-over process can make it more rhobust ?
Or, a correct Rs when using a lower C setting ?
It should be possible to use 3 terminal CerRes, but I'd agree not with the 36pF internals and 2000 ohms, as well.
You can also use a low capacitance diode to check with a voltmeter the p-p swing on the Xtal IN.
Gnd & +ve diodes for +peak, and Vcc& -Diode for -peak.
Use this to check how much change a scope probe causes, so you can adjust for that.
This is the startup of o good board with the probe at the XIN pin.
For comparison, this is a bad board. Without the probe it doesn't reliably start up but with the probe it does. My probe is a 1:10 type rated 13pF. When I measure the capacitance with the LCR meter it tells me 10pF. CLKMODE is XTAL1 + PLL16X. I also tried XTAL3+PLL16 which theoretically should work better due to the resonators internal Cs but it didn't make much difference. As jmg said, maybe I should additionally adjust the driver resistance (R) as the propeller can't select resistance and load capacitance independently.
This is the detailed view of the XIN signal. It is an almost perfect sine wave with ~2.5Vpp amplitude.
These are the XIN (trace#1) and XOUT (trace#2) signals sampled simultanously. XOUT is a bit distorted but I think ok. Phase shift is near 180°.
@all: Sorry, PM didn't work as it was switched off. It should work now.
Sounds like the Osc never actually starts, without the 'helper C'.
Series R can help check Osc Margins, as too can parallel damping resistances. ie you can make boards, then check some extra loading is still OK, before production release.
Did you try flipping the CerRes, just in case the pins are not identical ?
Are those last CRO plots, with the higher or lower internal C settings ?
Adding C has a similar Phase Effect, as the increasing Series R I suggested above, so you might like to allow both options on a revised PCB.
Series R will have less impact on operating frequency.
More C on the XOUT, also increases the voltage swing on XIN.