Re: wince serial driver
From: Reinhard Fischer (Fischer_at_discussions.microsoft.com)
Date: 10/11/04
- Next message: Reinhard Fischer: "Re: wince serial driver"
- Previous message: wiredless: "Power Management"
- Next in thread: Reinhard Fischer: "Re: wince serial driver"
- Maybe reply: Reinhard Fischer: "Re: wince serial driver"
- Maybe reply: Reinhard Fischer: "Re: wince serial driver"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 11 Oct 2004 07:25:04 -0700
Hello Michael,
is your problem solved already? I am looking for a solution to a problem,
which is pretty similar to yours. I am using the parity bit as a signal bit
in my application and I also need the content of the received byte, even if
it raises a parity error. Normally, in all desktop environments, I have got
no problem with my application. I can get the byte content an I am informed
about the parity error. Even in Windows CE this works fine, as long as I am
using the MIPS platform. There is no difference in behaviour to the desktop
applications. But if I try to port the application to an ARM platform
(SA-1110, PXA255, ...) the serial driver of this platform obviously discards
bytes received with a parity error and my communication fails. This is, what
might be the cause for your problem, too. I don't think, that this is a FIFO
problem. Otherwise the desktop applications and the MIPS application wouldn't
work.
So again, did you get a solution to your problem?
Best regards,
Reinhard Fischer
"Michael--J" wrote:
> Where do i make this call to CeSetThreadPrority(hThreadHandle, 30)? In my app or the serial driver? If i were to do it in my app using P/Invoke of coredll.dll, will it work? And why a level of 30? Thanks David. Sorry for the late reply...
>
> "David Liao (MS)" wrote:
>
> > You can try follows. It may work.
> >
> > The Data Read out is from IST and WaitCommEvent is call from Application
> > which is from another Thread. Assume after WaitCommEvent signaled, you are
> > using ReadFile to read all data that have been received in Buffer.
> >
> > The way may make this to work is Set Thread that call WaitCommEven as
> > highest Priority (lowest number, Try CeSetThreadPrority(hThreadHandle, 30)).
> >
> > Assume IST detect top data is bad and signal the Block thread which called
> > WaitCommEvent because this Thread has higher priority. It should run (and
> > IST stopped). It use ReadFile to Read Data in Buffer (do not block,
> > IntervalTimeout is MAXDWORD, TotalTimeout is 0) and Call WaitCommEvent
> > again.
> >
> > It is rely three thing to work. One is no Thread Priority inversion. Second,
> > Thread Switch delay does not cause Hardware FIFO overflow. In Buffer can
> > hold block of data you are going to receive. All of them are not guaranteed.
> >
> >
> >
> > David Liao
> >
> > "Michael--J" <MichaelJ@discussions.microsoft.com> wrote in message
> > news:C593A664-67D7-4C42-BD76-52B01C4AAB69@microsoft.com...
> > > I read in the UART 16550D datasheet that parity errors are raised when the
> > byte (with parity error) reaches the top of the FIFO. That is why i am able
> > to modify the driver source to insert the 0xff character in the receive
> > stream. I also notice in the driver code that an error event is raised just
> > before this... how can't this event correspond with the byte in error? And
> > since an event is raised everytime, why can't my application pick them ALL
> > up? Is it just too slow?
> > >
> > > Kind Regards,
> > >
> > > Michael--J
> > >
> > > "Steve Maillet (eMVP)" wrote:
> > >
> > > > No, as David pointed out it's physically impossible for the driver to
> > > > identify all parity error bytes when the UART has a built in FIFO. As
> > the
> > > > interrupt indicates a parity error but does not indicate what byte in
> > the
> > > > FIFO caused it. New bytes could come in by the time the interrupt is
> > > > serviced and the hardware itself does not provide enough information to
> > > > indicate the exact byte with the error.
> > > >
> > > > --
> > > > Steve Maillet (eMVP)
> > > > EmbeddedFusion
> > > > smaillet_AT_EmbeddedFusion_DOT_com
> > > >
> > > >
> > > >
> >
> >
> >
- Next message: Reinhard Fischer: "Re: wince serial driver"
- Previous message: wiredless: "Power Management"
- Next in thread: Reinhard Fischer: "Re: wince serial driver"
- Maybe reply: Reinhard Fischer: "Re: wince serial driver"
- Maybe reply: Reinhard Fischer: "Re: wince serial driver"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|