Re: Buffer size in serial port???

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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)


.



Relevant Pages

  • Re: Developing interrupt driven serial driver
    ... My next task is to make this driver codebase interrupt driven. ... deassert CTS so that the DTE would stop sending when the FIFO is full. ... interrupt handler for the receiver put the data into a larger buffer ...
    (comp.arch.embedded)
  • Re: Read full 8-bit character from serial port?
    ... This FIFO is three bytes deep. ... Thus, if the buffer is not read, the fifth character just ar- ... rived causes an overrun condition. ... with a long interrupt response time can use this mode to ...
    (comp.sys.apple2)
  • Re: Linux serial port dropping bytes
    ... characters at something like 20 per us. ... takes virtually the same time to read 128 bytes out the buffer ... during one interrupt, as to read 1 byte from the buffer during ... test for more in FIFO ...
    (comp.arch.embedded)
  • Re: problem with dyn. extending/shrinking array
    ... I have an interrupt function that kicks in when I can receive a byte ... // buffer was allocated with calloc ... measurement at a rate of once a second, you can use a timer interrupt ... If you have a clock with millisecond ...
    (comp.lang.c)
  • Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver
    ... * There are three lists which are used to keep track of the different states ... * are cleared, the interrupt is de-asserted. ... * Data Buffer Allocation Helpers ... the driver's private data structure ...
    (Linux-Kernel)