Re: Buffer size in serial port???
- From: "Ole" <ole@xxxxxxxxxx>
- Date: Wed, 5 Jul 2006 11:04:19 +0200
Thanks Valter. It looks like the key to solve my problem is close. The UART
has only a 16 byte FIFO, so I will try to change the interrupt priority but
will need some help to do this - Where exactly must i change the interrupt
priority and the buffer size and how? Following is from my platform.reg:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial]
"SysIntr"=dword:14
"IoBase"=dword:03F8
"IoLen"=dword:8
"DeviceArrayIndex"=dword:0
"Prefix"="COM"
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"Dll"="Com16550.Dll"
"Order"=dword:0
"Priority"=dword:0
; Turn on follows for Installable ISR (isr16550 supporting SOFTWARE FIFO
; "Irq"=dword:3
; "IsrDll"="isr16550.dll"
; "IsrHandler"="ISRHandler"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial\Unimodem]
"Tsp"="Unimodem.dll"
"DeviceType"=dword:0
"FriendlyName"=LOC_FRIENDLYNAME_SERIAL
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,
00,00, 08, 00, 00, 00,00,00,00
Thanks
Ole
"Valter Minute" <vminute@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:Xns97F762F6ECCCFVALTERMINUTE@xxxxxxxxxxxxxxxx
"Ole" <ole@xxxxxxxxxx> wrote in
news:e5w0T#$nGHA.4172@xxxxxxxxxxxxxxxxxxxx:
Is it possible to specify the max size in the serial port in PB?
the reason for asking is that I got a problem when running
applications if another device sents more than 256 bytes to my
device even though the buffersize is specified in the application
to e.g. 4000???? I'm using PB 5.0
Usually you have two levels of buffering on a serial port, one in
hardware (FIFO), that you can't change (but you may change the
threshold for interrupt generation) and one in software.
If you are working at an high speed and the driver don't process the
interrupt quickly enough you may miss some characters, even if you
have a big second-level buffer.
To solve this issue you may increase the priority of the interrupt
service thread or move the buffering inside the ISR, servicing the
interrupt quickly. Under \WINCE500\PUBLIC\COMMON\DRIVERS\SERIAL there
is a sample of a serial port ISR (ISR16550) that should help you
solve this kind of issues.
--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)
.
- Follow-Ups:
- Re: Buffer size in serial port???
- From: Valter Minute
- Re: Buffer size in serial port???
- References:
- Buffer size in serial port???
- From: Ole
- Re: Buffer size in serial port???
- From: Valter Minute
- Buffer size in serial port???
- Prev by Date: Re: RAS Connection : Long Distance
- Next by Date: Re: .NET CF
- Previous by thread: Re: Buffer size in serial port???
- Next by thread: Re: Buffer size in serial port???
- Index(es):
Relevant Pages
|