Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.

NetDev_ISR_Handler()

NetDev_ISR_Handler() is the device interrupt handler. In general, the device interrupt handler must perform the following functions:

  1. Determine which type of interrupt event occurred by switching on the ISR type argument, or reading an interrupt status register if the event type is unknown.
  2. If a receive event has occurred, the driver must post the interface number to the µC/TCP-IP Receive task by calling NetOS_IF_RxTaskSignal() for each new frame received.
  3. If a transmit complete event has occurred, the driver must perform the following items for each transmitted packet.

a Post the address of the data area that has completed transmission to the transmit buffer de-allocation task by calling NetOS_IF_TxDeallocTaskPost() with the pointer to the data area that has completed transmission.

b Call NetOS_Dev_TxRdySignal() with the interface number that has just completed transmission.

  1. Clear local interrupt flags.

External or CPU’s integrated interrupt controllers should be cleared from within the network device’s BSP-level ISR after NetDev_ISR_Handler() returns. Additionally, it is highly recommended that device driver ISR handlers be kept as short as possible to reduce the amount of interrupt latency in the system.

Each device’s NetDev_ISR_Handler() should check all applicable interrupt sources to see if they are active. This additional checking is necessary because multiple interrupt sources may be set within the interrupt response time and will reduce the number and overhead of handling interrupts. NetDev_ISR_Handler() should never return early.

  • No labels