eliminating intercharacter gap in serial stream? - Linux

This is a discussion on eliminating intercharacter gap in serial stream? - Linux ; Writing an Embbeded Linux app for a PC104/Versalogic board. Linux 2.6.14.17. Using write() to transmit data packets to another PC104 board. If I write() 30 bytes, sometimes there is a 2-5mS gap in the middle of the transmission--as seen on ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: eliminating intercharacter gap in serial stream?

  1. eliminating intercharacter gap in serial stream?

    Writing an Embbeded Linux app for a PC104/Versalogic board. Linux 2.6.14.17.

    Using write() to transmit data packets to another PC104 board. If I write()
    30 bytes, sometimes there is a 2-5mS gap in the middle of the
    transmission--as seen on a scope. Tried using low latency setting when
    opening the port--but this made no difference.

    Any ideas on how to force continous transmission of the data?

    Thanks,

    Bo



  2. Re: eliminating intercharacter gap in serial stream?

    On Wed, 10 Oct 2007 11:46:48 -0500, Bo wrote:


    >Writing an Embbeded Linux app for a PC104/Versalogic board. Linux 2.6.14.17.


    >Using write() to transmit data packets to another PC104 board. If I write()
    >30 bytes, sometimes there is a 2-5mS gap in the middle of the
    >transmission--as seen on a scope. Tried using low latency setting when
    >opening the port--but this made no difference.


    >Any ideas on how to force continous transmission of the data?


    What is the HZ value of the kernel you're using?
    The system can execute context changes no faster the master clock frequency.

  3. Re: eliminating intercharacter gap in serial stream?

    On 2007-10-10, Bo wrote:

    > Writing an Embbeded Linux app for a PC104/Versalogic board. Linux 2.6.14.17.


    Please don't multi-post like this. You've now started two
    unconnected but identical threads.

    --
    Grant Edwards grante Yow! NANCY!! Why is
    at everything RED?!
    visi.com

  4. Re: eliminating intercharacter gap in serial stream?


    "AZ Nomad" wrote in message
    news:slrnfgq8pt.jbg.aznomad.2@ip70-176-155-130.ph.ph.cox.net...
    > On Wed, 10 Oct 2007 11:46:48 -0500, Bo wrote:
    >
    >
    >>Writing an Embbeded Linux app for a PC104/Versalogic board. Linux
    >>2.6.14.17.

    >
    >>Using write() to transmit data packets to another PC104 board. If I
    >>write()
    >>30 bytes, sometimes there is a 2-5mS gap in the middle of the
    >>transmission--as seen on a scope. Tried using low latency setting when
    >>opening the port--but this made no difference.

    >
    >>Any ideas on how to force continous transmission of the data?

    >
    > What is the HZ value of the kernel you're using?


    100MHz

    > The system can execute context changes no faster the master clock
    > frequency.




  5. Re: eliminating intercharacter gap in serial stream?

    On 2007-10-30, Bo wrote:

    >>>Using write() to transmit data packets to another PC104 board.
    >>>If I write() 30 bytes, sometimes there is a 2-5mS gap in the
    >>>middle of the transmission--as seen on a scope. Tried using low
    >>>latency setting when opening the port--but this made no
    >>>difference.

    >>
    >>>Any ideas on how to force continous transmission of the data?

    >>
    >> What is the HZ value of the kernel you're using?

    >
    > 100MHz


    One presumes that you mean 100Hz.

    >> The system can execute context changes no faster the master
    >> clock frequency.


    Not true, but irrellevent. If he writes the entire message in
    one call, it will all be put into the tty layer's buffer. The
    data is read from there and written into the UART fifo by an
    interrupt service routine -- not by a user-task. The problem
    is at the ISR level, not at the user-task level.

    If a task blocks, another task is run immediately without
    waiting for the next "master clock" tick. That means that
    context changes can happen faster than the Hz tick value. If
    you want, you can configure a tickless kernel (no "master
    clock" at all). Were the assertion above true, no context
    changes could ever occur. Yet they do.


    --
    Grant Edwards grante Yow! Quick, sing me the
    at BUDAPEST NATIONAL ANTHEM!!
    visi.com

  6. Re: eliminating intercharacter gap in serial stream?

    On Tue, 30 Oct 2007 08:39:38 -0500, Bo wrote:



    >"AZ Nomad" wrote in message
    >news:slrnfgq8pt.jbg.aznomad.2@ip70-176-155-130.ph.ph.cox.net...
    >> On Wed, 10 Oct 2007 11:46:48 -0500, Bo wrote:
    >>
    >>
    >>>Writing an Embbeded Linux app for a PC104/Versalogic board. Linux
    >>>2.6.14.17.

    >>
    >>>Using write() to transmit data packets to another PC104 board. If I
    >>>write()
    >>>30 bytes, sometimes there is a 2-5mS gap in the middle of the
    >>>transmission--as seen on a scope. Tried using low latency setting when
    >>>opening the port--but this made no difference.

    >>
    >>>Any ideas on how to force continous transmission of the data?

    >>
    >> What is the HZ value of the kernel you're using?


    >100MHz


    No it isn't. The available HZ values for linux system are typicall
    100, 350, and 1000. And that is in HZ, not MHZ. It is the time tick
    frequency for when the kernel is woken up and a process switch can
    occur.

  7. Re: eliminating intercharacter gap in serial stream?

    On Tue, 30 Oct 2007 14:21:39 -0000, Grant Edwards wrote:


    >On 2007-10-30, Bo wrote:


    >>>>Using write() to transmit data packets to another PC104 board.
    >>>>If I write() 30 bytes, sometimes there is a 2-5mS gap in the
    >>>>middle of the transmission--as seen on a scope. Tried using low
    >>>>latency setting when opening the port--but this made no
    >>>>difference.
    >>>
    >>>>Any ideas on how to force continous transmission of the data?
    >>>
    >>> What is the HZ value of the kernel you're using?

    >>
    >> 100MHz


    >One presumes that you mean 100Hz.


    >>> The system can execute context changes no faster the master
    >>> clock frequency.


    >Not true, but irrellevent. If he writes the entire message in
    >one call, it will all be put into the tty layer's buffer. The
    >data is read from there and written into the UART fifo by an
    >interrupt service routine -- not by a user-task. The problem
    >is at the ISR level, not at the user-task level.


    >If a task blocks, another task is run immediately without
    >waiting for the next "master clock" tick. That means that
    >context changes can happen faster than the Hz tick value. If
    >you want, you can configure a tickless kernel (no "master
    >clock" at all). Were the assertion above true, no context
    >changes could ever occur. Yet they do.


    And what you'll have is cooperative multitasking.

  8. Re: eliminating intercharacter gap in serial stream?

    On 2007-10-30, AZ Nomad wrote:

    >>>> The system can execute context changes no faster the master
    >>>> clock frequency.

    >
    >>Not true, but irrellevent. If he writes the entire message in
    >>one call, it will all be put into the tty layer's buffer. The
    >>data is read from there and written into the UART fifo by an
    >>interrupt service routine -- not by a user-task. The problem
    >>is at the ISR level, not at the user-task level.

    >
    >>If a task blocks, another task is run immediately without
    >>waiting for the next "master clock" tick. That means that
    >>context changes can happen faster than the Hz tick value. If
    >>you want, you can configure a tickless kernel (no "master
    >>clock" at all). Were the assertion above true, no context
    >>changes could ever occur. Yet they do.

    >
    > And what you'll have is cooperative multitasking.


    That's complete nonsense.

    A master clock tick isn't required to have either time-slicing
    or prioritized pre-emption. It's trivial to design a tickless
    kernel with both features (I've done it for small embedded
    systems).

    http://www.news.com/2100-1007_3-6192865.html

    --
    Grant Edwards grante Yow! Look into my eyes and
    at try to forget that you have
    visi.com a Macy's charge card!

+ Reply to Thread