Dear Simon Glass, In message <CAPnjgZ37O2tr1kY5f-uv1zymGBdMLbyEhm6y-=rfenj62jn...@mail.gmail.com> you wrote: > > > How about using the time-honored flow-control mechanism? If the serial port > > supports hardware CTS and RTS signals, you can use them to sync with the > > sender. If not, you can send XOFF and XON to respectively ask the sender to > > pause and resume sending. Of course, the sender must support hardware or > > software flow control. > > It is common to have just a 2-wire UART for the console. Perhaps this > is unfortunate.
Indeed that's a pretty common configuration - but soft-flow would still work fine. > Are you suggesting that U-Boot should send XOFF sometimes, or does it > support this already? (I haven't seen it). When would U-Boot send > XOFF? Perhaps it could send XOFF at the end of each line that it > receives. Then XON when it starts reading the next line or maybe when > it runs out of characters and wants more. It should be sufficient to send XOFF when receiving a '\n' character (and storing that state) and XON when expecting inout (if state says XOFF had been sent before). > Most terminal problems will support software flow control. But are you > sure this is better? Definitely. for example, because it is hardware independent and will work on all architectures, all SoCs, all UARTs. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "We don't care. We don't have to. We're the Phone Company." _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot