Thread: 16450 UART interupt issue

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007

    16450 UART interupt issue

    With only the RDA interupt enabled, After a charcter is transferred into the holding register and the interupt goes active, I read the character from the RBR and the interupt goes inactive, but it then immediately goes active again. This is a 16450, so there is no FIFO , and no new character has been recieved by the UART. Any idea's on what could cause this?

    For now, I am going to try just clearing any other causes fro teh additional interrupt, but I would like to know what is actually causing it.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    In my memory, 8250/16X50 has always been a bit "strange" in their interrupt behaviour, so I'm not entirely surprised that it behaves funny.

    What is the value in bits 3-1 of INTID (port 0x2FA for Com1), and bit 0 of the register same? [When that second interrupt comes in, that is]

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    bit 3 will always be 0 since this is a 16450, there is no FIFO mode on the 16450. as for bits 0-2 Ill have to return that register on the transmit line. This isnt in a computer, its on a breadboard, I just figured since it is a common chip in comps that this woudl be a decent place to ask.

    What I did was write a more thorough interupt handler for each specific IID, although technicalyl only the RDA should ever occur, since the other interupts are disabled.

    The secondary interupt is still occuring, but it gets handled a lot sooner.

  4. #4
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Have you looked in your 16450's manual? (Which one? I'm looking at this one.)
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Yeha, I have the datasheet spread out on my desk. What it came down to was putting in code for every possible interupt, even the ones that 'can't' happen because they are disabled. This seemed t fix it, the second interupt is still occuring, but it gets handled and doesnt cause the system to behave erratically, so probably there was some interupt occuring that is unmaskable. It could be some undocumented feature as well. Either way it seems the UART is operating properly now. Thanks for the suggestions guys.
    Last edited by abachler; 04-25-2008 at 12:55 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. float calculation issue
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 05-26-2008, 04:56 AM
  2. type safe issue
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 02-12-2008, 09:32 PM
  3. directsound issue
    By valis in forum Tech Board
    Replies: 0
    Last Post: 06-25-2006, 09:28 PM
  4. Replies: 8
    Last Post: 01-17-2006, 05:39 PM
  5. my first issue of GDM
    By DavidP in forum A Brief History of
    Replies: 0
    Last Post: 09-12-2002, 04:02 PM