RE: xr16c864 Quad uart and shared interrupts

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,
When one ore more of the UARTS generate an interrupt, you need to check ALL
of the UARTS for data-ready, and handle the data (put it in rec-buf).

Hard to say what existing drivers do exactly without studying the code in
detail.
UARTS are simple enough to write a single-layered driver from scratch, so
you won't have to depend on external components (in this case MS...)

Greetings,
Rob.



"larstore@xxxxxxxxx" wrote:

Hello!

I have a geode system which uses a XR16C864 quad uart chip (connected
on the ISA bus).
This chip has 4 interruptlines going to a CPLD, where they are OR'ed,
and connected to the CPU IRQ10 line.

So, in other words i need to share IRQ10.

This system used to run Windows CE .net, and someone has written a
working driver and ISR, but when using this on Windows CE5 (which i
need to), it does not work.

The old ISR was actually just GIISR.DLL, which was called for each
uart like this

KernelLibIoControl(pHWHead->hIsrHandler, IOCTL_GIISR_INFO, &Info,
sizeof(Info), NULL, 0, NULL)

where the GIISR_INFO struct is:

Info.SysIntr = pHWHead->dwSysIntr;
Info.CheckPort = TRUE;
Info.PortIsIO = TRUE;
Info.UseMaskReg = FALSE;
Info.PortAddr = (DWORD)pHWHead->pIIR_FCR; //ISR when read
Info.PortSize = sizeof(BYTE);
Info.Mask = SERIAL_IIR_INT_SOURCE_MASK;

And, when the IST event is triggered, the ISR is read like this

KernelLibIoControl(pHWHead->hIsrHandler, IOCTL_GIISR_PORTVALUE, NULL,
0, &(pHWHead->IIR), sizeof(BYTE), NULL)

This returns the ISR of the correct uart, and the processing begins.


My problem is:

At some point beween CE4 and 5, MS decided to change the structure of
the COM16550 driver completely (from C to C++ and more layered).
I have created a new COM16864 driver based on this new COM16550, i
have also used the new GIISR,.
This works great as long as i only use one port at a time

BUT, when sending data to two ports at a time, the interrups goes
high(as seen on oscilliscope on com10), and it is not cleared until
the port is closed again.

I think this is because one of the UART receive FIFOs goes above the
trigger level, which will cause an interrupt, but for some reason the
interrupt is not registered in the driver, and therefore the FIFO will
not be emptied, and the interrupt stays high.


I have read alot about the GIISR not being suitable for serial IRQ
sharing, or that the GIISR_INFO checkport value will cause
unpredicable behaviour when used with IRQ sharing, but my problem is:
THIS WORKED ON THE OLD SYSTEM!

What happens when GIISR finds a valid value in the chain of ISRs? Will
it ever look further down the chain for another valid intterupt?


If anyone have any ideas or suggestions, please help!


Regards,
LT

.



Relevant Pages

  • Re: Synchronization between ISR and IST - I2C Based device
    ... The Smbus Controller doesnot int mechism it uses progrmmed IO to read ... The UART is a DUAL channel with single IRQ. ... when interrupt occurs we need to resolve the UART so that correct IST ... We have driver with critical section in the SMbus driver. ...
    (microsoft.public.windowsce.platbuilder)
  • 16550 Over-run errors on 200 MHz Atmel AT91SAM9263 @ 115200 on Windows CE 6.0
    ... My system is using a Quad UART from EXAR (shared interrupt). ... In order to use Shared Interrupts I am using the isr16550 driver. ... ISR is used) the hardware fifo's overflow well before Flow-Control ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Synchronization between ISR and IST - I2C Based device
    ... We are using a SMBus driver to read and Write from the SMBus devices. ... I am concerned with the UART whose registers are read through the SMBUs ... To find out which UART has produces the interrupt the ISR is written to ...
    (microsoft.public.windowsce.platbuilder)
  • xr16c864 Quad uart and shared interrupts
    ... I have a geode system which uses a XR16C864 quad uart chip (connected ... The old ISR was actually just GIISR.DLL, ... the COM16550 driver completely. ... interrupt is not registered in the driver, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: DoModal isnt reentrant but failure mode could be improved
    ... The parent receives a Windows Message that causes it to inform the user that a serial overrun occured. ... The reason such a Windows Message reaches the parent even while the first modal dialog is still on the screen is that it's not a keyboard or mouse input message, and CDialog's message loop retrieves it and dispatches it. ... Temporarily I seemed to understand the idea of trying to make the UART send an additional interrupt when the buffer's 8th byte gets filled but we still really want the UART to continue buffering while it's still necessary. ...
    (microsoft.public.vc.mfc)