English
Language : 

AN2282 Datasheet, PDF (9/19 Pages) STMicroelectronics – With the ever-increasing success
AN2282
Firmware
2
Firmware
The firmware is developed in several layers following the standard ISO/OSI model for
networking from physical layer up to application layer. A firmware architecture diagram is
shown below in Figure 7.
Figure 7. Firmware architecture
Application Layer
TCP/IP Layers
Modules: uip.c, uip_arp.c
Buffer
Device Driver
Modules: ethdev.c
Ethernet Device Driver
Modules: lan8900.c
STR7 Hardware Libraries and Device Interface
Modules: emi.c, ethdrv.c
The firmware also includes a module for the configuration of the GPIO used to manage the
reset signal and interrupt signal of the Ethernet Controller.
2.1
2.1.1
Ethernet controller driver
The two lower layers (the Ethernet Device Driver layer and the STR7 Hardware Libraries
and Device Interface layer) manage the CS8900A Ethernet controller and the physical
access to the device.
Low Level Interface
The emi.c is part of the STR710 library and it defines the functions for configuration of the
EMI peripheral. The ethdrv.c module provides the interface function to the upper layer and is
useful for low level access to the Ethernet controller when it is accessed in I/O mode:
● void outw(int address, short data); Writes a 16-bit data word to an I/O
register located at a given address.
● char inb(int address); Reads a byte data from an I/O register located at a given
address.
● short inw(int address); Reads a 16-bit word from an I/O register located at a
given address.
The module also provides the function for hardware reset of the Ethernet controller:
● void reset_NIC(void);
9/19