Loading and Unloading an Interrupt Service Routine (ISR)

4.1 Loading and Unloading an Interrupt Service Routine (ISR)

Before the ThunderLAN controller can be allowed to generate an interrupt to the host, it is necessary to install code for the host to handle the interrupt. The driver also relies on other host services that are interrupt-driven, like getting notice of timer ticks for deadman timers. The driver calculates the pattern to write to the interrupt controller to acknowledge the interrupt from the controller, based on the actual hardware interrupt line assigned to the NIC's slot.

This sample program hooks into the software vector table. The host PC timer interrupt comes first, so that the program can time out operations that can hang the PC and can also provide time stamp information for operations.

nic.OldTimer = HwSetIntVector((BYTE)0x1C, TimerIsr);

The driver points to the next code to execute when the timer interrupt goes off and saves the value for program restart. nic.OldTimer is a storage place for this information reserved in a routine called NICEVN, which is allocated for each NIC; this instance is called nic. HwSetIntVector is a function that inserts the address of a function into the interrupt table at a particular location:

//HwSetIntVector() ± Set PC interrupt vector and return previous one

//±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±

//Parameters:

//

bIRQ

BYTE

 

Irq to set

//

lpFunc

void

(ISR *)()

interrupt function

//

 

 

 

 

//Return val:

//void (ISR *)() Returns previous contents of vector //±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±

static void (ISR *HwSetIntVector( BYTE bIRQ, void (ISR *lpFunc)() ))()

{

BYTE bINT;

void (ISR *lpOld)(); if( bIRQ < 8 )

bINT = 8 + bIRQ ; else if (bIRQ < 15)

bINT = (0x70±8) + bIRQ;

else

bINT = bIRQ;

lpOld = _dos_getvect( bINT ); _dos_setvect( bINT,lpFunc);

return( lpOld );

}

4-2

Page 69
Image 69
Texas Instruments TNETE211, TNETE110A, TNETE100A manual Loading and Unloading an Interrupt Service Routine ISR

TNETE110A, TNETE211, TNETE100A specifications

Texas Instruments has been a leader in developing innovative semiconductor solutions, and their Ethernet PHY (Physical Layer Transceiver) family, specifically the TNETE100A, TNETE211, and TNETE110A, exemplifies this commitment to excellence. These devices are designed to address the needs of a variety of applications, ranging from industrial automation to consumer electronics.

The TNETE100A is a highly versatile Ethernet PHY capable of supporting 10/100 Mbps Ethernet connectivity. One of its main features is the low power consumption, which makes it an ideal choice for battery-operated devices. It incorporates advanced power management technologies, ensuring that the device operates efficiently while maintaining high performance. The TNETE100A also supports Auto-Negotiation, allowing for seamless communication between devices at different speeds, thereby enhancing flexibility in network configurations.

Moving to the TNETE211, this device supports 10/100/1000 Mbps Ethernet, making it suitable for high-speed networking applications. This PHY integrates features such as Energy Efficient Ethernet (EEE), which reduces power consumption during low-traffic periods, aligning with the contemporary demand for energy efficiency in networking equipment. The TNETE211 is engineered with robust EMI (Electromagnetic Interference) performance and provides multiple interface options, making it a versatile choice for embedded systems and networking applications.

The TNETE110A stands out in the lineup as a sophisticated device that supports both Fast Ethernet and Gigabit Ethernet. This PHY utilizes advanced signal processing techniques to ensure superior link robustness and performance in noisy environments. Its features include an integrated transformer driver, which simplifies PCB design and allows for compact device layouts. Additionally, the TNETE110A is designed to be fully compliant with Ethernet standards, ensuring reliable interoperability with other network components.

All three PHYs leverage Texas Instruments' expertise in integrated circuit design, resulting in low jitter and high signal integrity, essential for modern communication standards. They are optimized for a wide range of temperatures, making them suitable for harsh industrial applications. With built-in diagnostic capabilities, these devices also enable efficient fault detection and troubleshooting in network infrastructures.

In summary, the Texas Instruments TNETE100A, TNETE211, and TNETE110A are exemplary Ethernet PHY devices, each tailored to meet specific networking needs while adhering to stringent efficiency and performance criteria. Their advanced features, technologies, and reliability make them pivotal components in today's fast-paced digital landscape.