PanelDue causes random print failures January 29, 2015 06:33PM |
Registered: 9 years ago Posts: 38 |
Re: PanelDue causes random print failures January 29, 2015 07:34PM |
Registered: 10 years ago Posts: 14,672 |
Re: PanelDue causes random print failures January 29, 2015 07:54PM |
Registered: 9 years ago Posts: 38 |
Re: PanelDue causes random print failures January 29, 2015 07:59PM |
Registered: 10 years ago Posts: 14,672 |
Re: PanelDue causes random print failures January 30, 2015 05:28AM |
Registered: 9 years ago Posts: 38 |
Quote
dc42
If the problem is an overrun error, turning in parity won't help.
I've uploaded a version of 1.00c Duet firmware with the baud rate reduced to 57600 to the usual place, and I'm about to upload a 57600b PanelDue binary for the 4.3 inch screen. Please try them. Look for the files with 57600 in the filename.
Re: PanelDue causes random print failures January 30, 2015 07:16AM |
Registered: 10 years ago Posts: 14,672 |
Quote
pantau
Ok will try in the evening, but shouldn't there be a dependency on which screen I'm in on the PanelDue or if I press buttons if it is an overrun? At least I couldn't see this in my tests.
Re: PanelDue causes random print failures January 30, 2015 08:11AM |
Registered: 9 years ago Posts: 38 |
That's what I saw in the code. My question was the other way around: Assuming the root cause is a buffer overflow in the Duet: Shouldn't I get more problems if I use/play around with the panel during print as I increase the data flow?Quote
dc42
The PanelDue send a M105 polling message every 2 seconds or so when you are not pressing anything, no matter what screen you are in. The only exception is when you are in the touch calibration screen.
Re: PanelDue causes random print failures January 30, 2015 09:10AM |
Registered: 10 years ago Posts: 2,472 |
Re: PanelDue causes random print failures January 30, 2015 09:13AM |
Registered: 10 years ago Posts: 14,672 |
Re: PanelDue causes random print failures January 30, 2015 10:34AM |
Registered: 9 years ago Posts: 38 |
Quote
dmould
Assuming that you are using a MAX232 or similar for level changing at each end, it will only be achieving +/- 8V or so and with 1m of wire I'd say that errors at that baud rate are very likely.
Dave
Re: PanelDue causes random print failures January 30, 2015 11:21AM |
Registered: 10 years ago Posts: 14,672 |
Re: PanelDue causes random print failures January 30, 2015 01:34PM |
Registered: 10 years ago Posts: 2,472 |
Quote
dc42
I haven't got round to putting up the schematic on github yet, but I will do so soon. The link is at 3.3V logic levels, with a 2.2K series resistor in each signal line and a Schottky protection diode to +5V on the microcontroller side of the resistor. I haven't seen any errors at 115kb in testing with up to 750mm of cable.
Re: PanelDue causes random print failures January 30, 2015 05:58PM |
Registered: 10 years ago Posts: 14,672 |
Quote
dmould
I really would not trust a logic level serial link at that baud rate over more than a few cm. I've even had errors at 9600Bd on a TTL (5V) logic level link over about 3m of loose wire, and when I looked at the received signal on a 'scope it was not all that surprising. It's OK for something non-critical such as a debug port, and you may get away with it if you have good error detection/correction, but IMO guaranteed error-free comms via a simple asynch serial link either needs a pretty low baud rate or good, impedance matched driver hardware and paired or screened cabling for any distance more than finger-length or so if you cannot tolerate errors,
Re: PanelDue causes random print failures January 31, 2015 08:46AM |
Registered: 10 years ago Posts: 2,472 |
Quote
dc42
Quote
dmould
I really would not trust a logic level serial link at that baud rate over more than a few cm. I've even had errors at 9600Bd on a TTL (5V) logic level link over about 3m of loose wire, and when I looked at the received signal on a 'scope it was not all that surprising. It's OK for something non-critical such as a debug port, and you may get away with it if you have good error detection/correction, but IMO guaranteed error-free comms via a simple asynch serial link either needs a pretty low baud rate or good, impedance matched driver hardware and paired or screened cabling for any distance more than finger-length or so if you cannot tolerate errors,
That's a nice theory, so I hung an oscilloscope on the Din and Dout pins of the PanelDue, with a 750mm cable connecting it to the Duet. Here is the trace on Dout:
This was at 57600 baud. The Din trace is similar but the rise and fall times are faster as there is no 2.2K series resistor to slow down the signal from the Duet. There is no sign of ringing. This is just as I would expect, because ringing is normally only a problem at higher frequencies than this or with very long cable lengths. So I really don't think the cabling is a problem, even at 115200 baud. I still think the problem is likely to be the serial receive interrupt latency caused by the step ISR. Unfortunately, the UART on the Duet has only a 1-character receive holding buffer. If reducing the baud rate doesn't fix the problem, then I'll try using DMA, or reprogramming the NVIC so that the serial receive ISR can interrupt the step ISR.
Re: PanelDue causes random print failures January 31, 2015 09:21AM |
Registered: 10 years ago Posts: 14,672 |
Re: PanelDue causes random print failures January 31, 2015 11:08AM |
Registered: 9 years ago Posts: 38 |
Re: PanelDue causes random print failures January 31, 2015 02:39PM |
Registered: 10 years ago Posts: 14,672 |
Quote
I will also try the new versions you released, but I set my hope right now on the checksums, so will try this first.
Re: PanelDue causes random print failures January 31, 2015 06:42PM |
Registered: 9 years ago Posts: 38 |
Re: PanelDue causes random print failures January 31, 2015 07:46PM |
Registered: 10 years ago Posts: 2,472 |
[SOLVED] Re: PanelDue causes random print failures February 04, 2015 06:00PM |
Registered: 9 years ago Posts: 38 |
Re: PanelDue causes random print failures February 05, 2015 02:21AM |
Registered: 10 years ago Posts: 14,672 |
[SOLVED] PanelDue causes random print failures February 05, 2015 11:07AM |
Registered: 9 years ago Posts: 38 |
Re: [SOLVED] PanelDue causes random print failures February 05, 2015 11:21AM |
Registered: 10 years ago Posts: 14,672 |
Quote
pantau
Quote
dc42
Thanks for the update! Would you care to add [SOLVED] to the subject line now?
I tried, but it seems that I can just edit my last post?
Am I overlooking something?
Re: PanelDue causes random print failures February 05, 2015 12:21PM |
Registered: 10 years ago Posts: 2,472 |