Menu

#6 Excessive interrupts in serial port example

open
None
5
2007-02-03
2007-01-14
No

Some cases of excessive interrupts have been reported, see this thread on the lpcusb forum
https://sourceforge.net/forum/message.php?msg_id=4095179
and this thread on the lpc2000 mailing list
http://tech.groups.yahoo.com/group/lpc2000/message/21597

Discussion

  • Bertrik Sikken

    Bertrik Sikken - 2007-02-03
    • assigned_to: nobody --> bertrik
     
  • Bertrik Sikken

    Bertrik Sikken - 2007-02-03

    Logged In: YES
    user_id=282107
    Originator: YES

    The cause of the excessive interrupts seems to be the rate at which the host sends IN tokens. This results in an endless stream of bulk-in NAK interrupts.

    A fix that seems to work fine so far:
    * BULK IN interrupt handler disables the interrupt-on-NAK feature when the transmit FIFO is empty
    * FRAME interrupt handler enables the interrupt-on-NAK feature again when it discovers that there is some data in the transmit FIFO.

    Probably a better fix is to enable/disable the bulk-in interrupt, but I can't make that work for currently unknown reason. No more interrupts are seen if the bulk-in interrupt is enabled again.

     
  • Bertrik Sikken

    Bertrik Sikken - 2007-02-05

    Logged In: YES
    user_id=282107
    Originator: YES

    A simple fix has been implemented in revision 142 of the SVN archive: interrupt-on-NAK feature is disabled when sending last packet to host and re-enabled in the USB frame interrupt.

    The USB mass storage application example also seems to suffer from the same problem.

     

Log in to post a comment.