resnicks@netcom.COM (Steve Resnick) (05/30/91)
I have a bunch of interrupt driven serial code I wrote, which inits the port, sets up interrupts and handlers, then queus all incoming and outgoing data ... So far so good, except that I get one interrupt. I am doing an EOI by sending 20H to port 20H, and OUT2 is asserted to enable 8250 interrupts. My interrupt enable value is 3, and my mask value to the 8250 is 0xEA. Any ideas? Thanx, Steve -- ------------------------------------------------------------------------------- resnicks@netcom.com, steve@camphq, IFNA: 1:143/105.0, co moderator for comp.binaries.os2 Real life: Steve Resnick. Chief Software Architect, Process Scientific, Inc Flames, grammar and spelling errors >/dev/null The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2 -------------------------------------------------------------------------------
jgb@prism.gatech.EDU (James G. Baker) (06/04/91)
In article <1991May30.015340.27879@netcom.COM> resnicks@netcom.COM (Steve Resnick) writes: > >I have a bunch of interrupt driven serial code I wrote, which inits the >port, sets up interrupts and handlers, then queus all incoming and outgoing >data ... So far so good, except that I get one interrupt. I am doing an EOI >by sending 20H to port 20H, and OUT2 is asserted to enable 8250 interrupts. >My interrupt enable value is 3, and my mask value to the 8250 is 0xEA. Getting only one interrupt sounds like the EOI is not being sent correctly. You say your interrupt enable value is 3 = ? = irq3? Keep in mind that on an AT, if you use irq2 it is actually irq9 (transparent) except that two EOI must be sent. If it is irq3, could there be anything else using irq3? Can you switch it to something else like irq5 (AT)? Good luck. -J Baker -- BAKER,JAMES G - Undergraduate Lab Instructor, School of Electrical Engineering ____ _ _ Georgia Institute of Technology, Atlanta Georgia, 30332 | | _ |_) uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!jgb (_|. |_). |_). Internet: jgb@prism.gatech.edu, jgb@ee, jgb@eecom, jgb@cc
resnicks@netcom.COM (Steve Resnick) (06/05/91)
In article <30559@hydra.gatech.EDU> jgb@prism.gatech.EDU (James G. Baker) writes: >In article <1991May30.015340.27879@netcom.COM> resnicks@netcom.COM (Steve Resnick) writes: >> >>I have a bunch of interrupt driven serial code I wrote, which inits the >>port, sets up interrupts and handlers, then queus all incoming and outgoing >>data ... So far so good, except that I get one interrupt. I am doing an EOI >>by sending 20H to port 20H, and OUT2 is asserted to enable 8250 interrupts. >>My interrupt enable value is 3, and my mask value to the 8250 is 0xEA. > >Getting only one interrupt sounds like the EOI is not being sent correctly. Actually, I misstated above, the mask value to the 8259 is 0xEA. ^^^^ The problem turned out to be mis-reading the interrupt ID register on the UART. Since the UART wasn't getting the correct interrupt reset, it would only generate one (data available) and wait for it to be cleared. >You say your interrupt enable value is 3 = ? = irq3? Keep in mind that >on an AT, if you use irq2 it is actually irq9 (transparent) except that two >EOI must be sent. The interrupt enable value was for the UART, not the PIC. Addtional information about IRQ 9, is that IRQ 9 generates an INT 0x71, rather than an INT 0x11, since the slave 8259 uses a different offset value. > >If it is irq3, could there be anything else using irq3? Can you switch >it to something else like irq5 (AT)? > irq5 (AT) ?? - 5 should be valid on any PC - it's the default IRQ used for LPT2. In anycase, I have the code working and may now read/write to my serial port with ease :) Cheers! Steve -- ------------------------------------------------------------------------------- resnicks@netcom.com, steve@camphq, IFNA: 1:143/105.0, co moderator for comp.binaries.os2 Real life: Steve Resnick. Chief Software Architect, Process Scientific, Inc Flames, grammar and spelling errors >/dev/null The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2 -------------------------------------------------------------------------------