Thread: Re: [Flashforth-devel] Xon/Xoff how to
Brought to you by:
oh2aun
From: Mikael N. <mik...@pp...> - 2014-07-20 11:35:30
|
<div style="font-size:10pt;"><div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">It is a problem with too much latency in serial transmission, usually caused by too long queues in the UART or the USB bridge. Using lower bauds may decrease the buffer sizes, or not...</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">Some USB bridges can handle xon xoff in good way and some not...</p><p style="margin-top:0;margin-bottom:0;">A USB bridge that supports rts cts can solve the problem.</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">The same appli</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>pito<pi...@vo...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Sun, 20/07/2014 12:26</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>flashforth-devel;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>[Flashforth-devel] Xon/Xoff how to</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>I've been using Xon/Xoff with FF50 and dspic33@40MHz and Teraterm @115k2, all done via CA-42 usb/serial. Rx buffer increased to 128bytes. The code uploaded works only when I set interchar delay to 1ms and endline delay to 100ms. When interchar set to 0, it uploads without showing errors but the code hangs. Is there any trick how to push the serial to use Xon/Xoff actually? Is that an issue of CA-42 and a like? P. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Flashforth-devel mailing list Fla...@li... https://lists.sourceforge.net/lists/listinfo/flashforth-devel </pre></div></div> |
From: Herman A. <exp...@vn...> - 2014-07-20 11:45:30
|
Hello Pito, Usually I use 38400 bps, but somtimes needed interchar and endline delay for reliable upload, depending on speed and actual load of PC. I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable with XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. However the most reliable solution the HW flow control, especially if you want to use hi bitrate. BR Attila Herman |
From: pito <pi...@vo...> - 2014-07-20 18:00:22
|
After some experiments it seems to me the issue is with the time the compiler needs to process a new word. With interchar delay set to 0 and line delay ie. 300ms it works fine. Maybe an "uploader" which will send the chars full speed and then wait some time after sending the closing ";" would solve all issues... P. ______________________________________________________________ > Od: Herman Attila <exp...@vn...> > Komu: <fla...@li...> > Datum: 20.07.2014 13:45 > Předmět: Re: [Flashforth-devel] Xon/Xoff how to > >Hello Pito, > >Usually I use 38400 bps, but somtimes needed interchar and endline >delay for reliable upload, depending on speed and actual load of PC. >I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable with >XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. >However the most reliable solution the HW flow control, especially if >you want to use hi bitrate. > >BR >Attila Herman > >------------------------------------------------------------------------------ >Want fast and easy access to all the code in your enterprise? Index and >search up to 200,000 lines of code with a free copy of Black Duck >Code Sight - the same software that powers the world's largest code >search on Ohloh, the Black Duck Open Hub! Try it now. >http://p.sf.net/sfu/bds >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@pp...> - 2014-08-03 08:15:28
|
I agree, with USB the best solution is to use HW flow control. I am using now a Microstick2 on a Microstickplus peripheral board. The Microstickplus has a MCP2200 USB serial bridge. The CTS/RTS pins are not connected from the MCP2200, so some soldering is required to connect the CTS (SOIC PIN13) to a free PIC pin. I connected it to the RB12 led pin so I get a nice flashing led each time the CTS line is asserted from FlashForth. The MCP2200 configuration utility (Windows) must be used to enable CTS/RTS pins. These are not enabled by default on the Microstickplus board. Works a 100 % reliable without any delays configured in minicom. BR Mike On 20.07.2014 14:28, Herman Attila wrote: > > Hello Pito, > > Usually I use 38400 bps, but somtimes needed interchar and endline > delay for reliable upload, depending on speed and actual load of PC. > I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable with > XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. > However the most reliable solution the HW flow control, especially if > you want to use hi bitrate. > > BR > Attila Herman |
From: Herman A. <exp...@vn...> - 2014-08-09 19:11:28
|
Mikael, My thoughts with XON/XOFF topic come from experience of the earlier FF versions. Thoroughgoing testing the FF5.0 with SW-FC, the trouble seems not a simple delay problem. Using #define FC_TYPE_SW ENABLE in p18f-main.cfg the FF5.0 does not send or receive XON/XOFF characters in any direction. I think so, it works without any flow control. Maybe I failed, but please check it. I used 18F46K22@64MHz in test. The HW-FC works fine. BR Attila Sun, 03 Aug 2014 11:15:19 +0300 Mikael Nordman <mik...@pp...> írta: > I agree, with USB the best solution is to use HW flow control. > I am using now a Microstick2 on a Microstickplus peripheral board. > > The Microstickplus has a MCP2200 USB serial bridge. > The CTS/RTS pins are not connected from the MCP2200, so some >soldering > is required to connect the CTS (SOIC PIN13) to a free PIC pin. > I connected it to the RB12 led pin so I get a nice flashing led each > time the CTS line is asserted from FlashForth. > > The MCP2200 configuration utility (Windows) must be used to enable > CTS/RTS pins. These are not enabled by default on the Microstickplus >board. > > Works a 100 % reliable without any delays configured in minicom. > > BR Mike > > On 20.07.2014 14:28, Herman Attila wrote: >> >> Hello Pito, >> >> Usually I use 38400 bps, but somtimes needed interchar and endline >> delay for reliable upload, depending on speed and actual load of PC. >> I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable >>with >> XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. >> However the most reliable solution the HW flow control, especially >>if >> you want to use hi bitrate. >> >> BR >> Attila Herman > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index >and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ >Flashforth-devel mailing list >Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: Mikael N. <mik...@pp...> - 2014-08-10 12:00:40
|
On my 18f2620 board the XON/XOFF definetly works. The serial line is connected to a real serial interface running on linux. I tested it by disabling flow control in minicom, and then I get a lot of FF UART interrupt buffer overflows indicated by a | transmitted to the PC. When I enable the xon/xoff flow control in minicom, then all works and nothing is lost. Minicom is operating with 38400 baud and no delays configured. I have the following configuration constant RX1_BUF_SIZE = d'32' constant RX1_OFF_FILL = d'4' #define FC_TYPE_SW ENABLE ; ENABLE OR DISABLE BR Mike |
From: Mikael N. <mik...@pp...> - 2014-08-13 13:44:48
|
Actually I found a bug in the FF5.0 PIC24-30-33 XON/XOFF handling. It only works with the unbuffered TX option. .equ TX1_BUF_SIZE, 0 ; Use 0 for unbuffered TX. It will release a fix in the near future. BR Mike |
From: Mikael N. <mik...@pp...> - 2014-07-21 14:00:45
|
<div style="font-size:10pt;"><p style="margin-top:0;margin-bottom:0;">The processing delay comes from the flash write delay which stops the processor. Flash write can happen also at other occasions than ;</p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">A python shell similar to amforths would solve flow control issues and give additonal funtionality like command history, line edit and include files</p><p style="margin-top:0;margin-bottom:0;"> </p><div><signature_tag><p style="margin-top:0;margin-bottom:0;">Mike</p><p style="margin-top:0;margin-bottom:0;">Sent from my LG Mobile</p></signature_tag></div><p id="last_enter" style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;"> </p><p style="margin-top:0;margin-bottom:0;">------ Original message------</p> <p style="margin-top:0;margin-bottom:0;"><b>From: </b>pito<pi...@vo...></p><p style="margin-top:0;margin-bottom:0;"><b>Date: </b>Sun, 20/07/2014 21:00</p><p style="margin-top:0;margin-bottom:0;"><b>To: </b>Herman Attila;fla...@li...;Mikael Nordman;</p><p style="margin-top:0;margin-bottom:0;"><b>Subject:</b>Re: [Flashforth-devel] Xon/Xoff how to</p><p style="margin-top:0;margin-bottom:0;"> </p><pre>After some experiments it seems to me the issue is with the time the compiler needs to process a new word. With interchar delay set to 0 and line delay ie. 300ms it works fine. Maybe an "uploader" which will send the chars full speed and then wait some time after sending the closing ";" would solve all issues... P. ______________________________________________________________ > Od: Herman Attila <exp...@vn...> > Komu: <fla...@li...> > Datum: 20.07.2014 13:45 > Předmět: Re: [Flashforth-devel] Xon/Xoff how to > >Hello Pito, > >Usually I use 38400 bps, but somtimes needed interchar and endline >delay for reliable upload, depending on speed and actual load of PC. >I don't know the CA-42, but e.g. the ATEN UC232 seems me unusable with >XON/XOFF. I use FÍT232RL, FT230XQ chips of FTDI. >However the most reliable solution the HW flow control, especially if >you want to use hi bitrate. > >BR >Attila Herman > >------------------------------------------------------------------------------ >Want fast and easy access to all the code in your enterprise? Index and >search up to 200,000 lines of code with a free copy of Black Duck >Code Sight - the same software that powers the world's largest code >search on Ohloh, the Black Duck Open Hub! Try it now. >http://p.sf.net/sfu/bds >_______________________________________________ >Flashforth-devel mailing list >Fla...@li... >https://lists.sourceforge.net/lists/listinfo/flashforth-devel > </pre></div> |