Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-14 Thread Gilles Chanteperdrix
On 02/13/2014 02:19 AM, Bill Metzenthen wrote: On 13/02/14 07:26, Drasko DRASKOVIC wrote: Let's say that we want to bitbang Linux serial console at 1200bps. Then it would make bit high period of ~833us. 5% of tolerated error is ~40us, and according to these benchmarks http://www.denx.de/wiki/DUL

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-13 Thread Gilles Chanteperdrix
On 02/14/2014 07:03 AM, Adam Vaughan wrote: >> if you want to avoid wasting cycles saving and >> restoring context, and only use the banked register available in FIQ >> mode, you have to use assembly, simply because gcc simply does not know >> the registers it can not use when in FIQ mode. > >

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-13 Thread Adam Vaughan
> if you want to avoid wasting cycles saving and > restoring context, and only use the banked register available in FIQ > mode, you have to use assembly, simply because gcc simply does not know > the registers it can not use when in FIQ mode. Yes, that's completely correct. You're basically t

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-13 Thread Gilles Chanteperdrix
On 02/13/2014 02:14 AM, Adam Vaughan wrote: >> There is no point, an FIQ can preempt anything, and because of this, can >> not use any Linux, Xenomai, or Adeos service. FIQ handlers are written >> in assembly. > > An FIQ doesn't have to be written in assembly, but if you're looking > for precise c

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-13 Thread Gilles Chanteperdrix
On 02/12/2014 11:46 PM, Drasko DRASKOVIC wrote: > Hi Charles, > > On Wed, Feb 12, 2014 at 11:36 PM, Charles Steinkuehler > wrote: >> There are also lots of ways to turn other hardware (timer/capture pins, >> SPI ports, PWM channels) into UARTs, but you don't mention exactly what >> chip you're us

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Tom Evans
On 13/02/14 09:46, Drasko DRASKOVIC wrote: The module I use is Carambola2: http://8devices.com/carambola-2. It has AR9331 Atheros chip with MIPS24Kc core. There is one USB that can be used for COM purposes, but I have to keep it for other peripheral. Why not plug in a USB Hub when you want to

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Bill Metzenthen
On 13/02/14 07:26, Drasko DRASKOVIC wrote: Let's say that we want to bitbang Linux serial console at 1200bps. Then it would make bit high period of ~833us. 5% of tolerated error is ~40us, and according to these benchmarks http://www.denx.de/wiki/DULG/AN2008_03_Xenomai_gpioirqbench a machinle like

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Adam Vaughan
> There is no point, an FIQ can preempt anything, and because of this, can > not use any Linux, Xenomai, or Adeos service. FIQ handlers are written > in assembly. An FIQ doesn't have to be written in assembly, but if you're looking for precise control over what the processor is doing, you probably

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Drasko DRASKOVIC
Hi Charles, On Wed, Feb 12, 2014 at 11:36 PM, Charles Steinkuehler wrote: > There are also lots of ways to turn other hardware (timer/capture pins, > SPI ports, PWM channels) into UARTs, but you don't mention exactly what > chip you're using so I can't make any specific suggestions. Thanks for

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Gilles Chanteperdrix
On 02/12/2014 11:39 PM, Drasko DRASKOVIC wrote: > On Wed, Feb 12, 2014 at 10:45 PM, Gilles Chanteperdrix > wrote: >> On 02/12/2014 09:26 PM, Drasko DRASKOVIC wrote: >>> Hi Gilles, Lennart, >>> >>> On Wed, Feb 12, 2014 at 6:36 PM, Lennart Sorensen >>> wrote: On Wed, Feb 12, 2014 at 12:18:13PM

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Drasko DRASKOVIC
On Wed, Feb 12, 2014 at 10:45 PM, Gilles Chanteperdrix wrote: > On 02/12/2014 09:26 PM, Drasko DRASKOVIC wrote: >> Hi Gilles, Lennart, >> >> On Wed, Feb 12, 2014 at 6:36 PM, Lennart Sorensen >> wrote: >>> On Wed, Feb 12, 2014 at 12:18:13PM +0100, Gilles Chanteperdrix wrote: On 02/12/2014 11:

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Charles Steinkuehler
On 2/12/2014 3:45 PM, Gilles Chanteperdrix wrote: > On 02/12/2014 09:26 PM, Drasko DRASKOVIC wrote: >> Hi Gilles, Lennart, >> >> I am asking all this because I have only one UART on my >> microprocessor, and I have to connect one peripheral which demands >> serial communication. And I do not want t

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Gilles Chanteperdrix
On 02/12/2014 09:26 PM, Drasko DRASKOVIC wrote: > Hi Gilles, Lennart, > > On Wed, Feb 12, 2014 at 6:36 PM, Lennart Sorensen > wrote: >> On Wed, Feb 12, 2014 at 12:18:13PM +0100, Gilles Chanteperdrix wrote: >>> On 02/12/2014 11:42 AM, Drasko DRASKOVIC wrote: Hi all, I was wondering can U

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Lennart Sorensen
On Wed, Feb 12, 2014 at 09:26:58PM +0100, Drasko DRASKOVIC wrote: > Yes, interesting... I did not know about this. There is some more info > over there: > http://electronics.stackexchange.com/questions/5850/how-critical-are-uart-frequencies. > > Let's say that we want to bitbang Linux serial cons

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Drasko DRASKOVIC
Hi Gilles, Lennart, On Wed, Feb 12, 2014 at 6:36 PM, Lennart Sorensen wrote: > On Wed, Feb 12, 2014 at 12:18:13PM +0100, Gilles Chanteperdrix wrote: >> On 02/12/2014 11:42 AM, Drasko DRASKOVIC wrote: >> >Hi all, >> >I was wondering can UART be simulated with GPIO bitbang on Linux >> >kernel with

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Lennart Sorensen
On Wed, Feb 12, 2014 at 12:18:13PM +0100, Gilles Chanteperdrix wrote: > On 02/12/2014 11:42 AM, Drasko DRASKOVIC wrote: > >Hi all, > >I was wondering can UART be simulated with GPIO bitbang on Linux > >kernel with Xenomai, and what bitrates (frequencies) can be expected? > > That probably depends

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Gilles Chanteperdrix
On 02/12/2014 12:36 PM, Drasko DRASKOVIC wrote: On Wed, Feb 12, 2014 at 12:18 PM, Gilles Chanteperdrix wrote: On 02/12/2014 11:42 AM, Drasko DRASKOVIC wrote: Hi all, I was wondering can UART be simulated with GPIO bitbang on Linux kernel with Xenomai, and what bitrates (frequencies) can be ex

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Drasko DRASKOVIC
On Wed, Feb 12, 2014 at 12:18 PM, Gilles Chanteperdrix wrote: > On 02/12/2014 11:42 AM, Drasko DRASKOVIC wrote: >> >> Hi all, >> I was wondering can UART be simulated with GPIO bitbang on Linux >> kernel with Xenomai, and what bitrates (frequencies) can be expected? > > > That probably depends a l

Re: [Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Gilles Chanteperdrix
On 02/12/2014 11:42 AM, Drasko DRASKOVIC wrote: Hi all, I was wondering can UART be simulated with GPIO bitbang on Linux kernel with Xenomai, and what bitrates (frequencies) can be expected? That probably depends a lot on the (irq) latencies you get with the platform you target. At 115200 baud

[Xenomai] UART (serial port) with GPIO bitbang on Linux

2014-02-12 Thread Drasko DRASKOVIC
Hi all, I was wondering can UART be simulated with GPIO bitbang on Linux kernel with Xenomai, and what bitrates (frequencies) can be expected? Best regards, Drasko ___ Xenomai mailing list Xenomai@xenomai.org http://www.xenomai.org/mailman/listinfo/xeno