AN2700 Freescale Semiconductor / Motorola, AN2700 Datasheet - Page 31

no-image

AN2700

Manufacturer Part Number
AN2700
Description
Basic Web Server Development with MC9S12NE64 and CMX-MicroNet TCP/IP Stack
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
emac_fifo_cfg.h
An excerpt of the source code for emac_fifo_cfg.h is provided. The code shows configurations for the
EMAC Ethernet buffer allocation.
For the MC9S12NE64, 8K of RAM is available and shared between user RAM and the EMAC Ethernet
buffer space. The EMAC Ethernet buffer space consists of three buffers:
Each buffer is designed to hold only one Ethernet frame.
shared RAM usage within the MC9S12NE64 MCU.
Because the maximum size of an Ethernet frame is approximately 1.5 Kbytes, a setting of BUFMAP = 4
would allow each of the three MC9S12NE64 buffers to hold one frame of the maximum allowable size as
dictated by the IEEE 802.3 specification. Settings for BUFMAP less than 4 are provided to:
The setting of BUFMAP is a system/network design decision. If devices on the network should accept only
Ethernet packets of a certain size, BUFMAP should be configured accordingly.
Setting BUFMAP to create a buffer size limit reduces the burden of the CPU by ignoring packets that are
too large. If a receive frame exceeds the receive buffer size, the frame is not accepted, and neither the
receive complete flag nor the receive error flag is set. No CPU bandwidth is used because the EMAC state
machine does all packet filtering.
Freescale Semiconductor
One transmit buffer
Two receive buffers
Maximize user RAM
Provide a filtering mechanism based on Ethernet packet size
BUFMAP
0
1
2
3
4
Basic Web Server with MC9S12NE64 and CMX-MicroNet TCP/IP Stack, Rev. 0.3
Individual Buffer Size
(Bytes)
1.5K
Table 5. Shared RAM Usage
128
256
512
1K
Overview of a Web Server Developed Using CMX-MicroNet TCP/IP Stack
Ethernet Buffer Space
Total Size of EMAC
Table 5
384 = 0.375K
768 = 0.75K
1536 = 1.5K
4608 = 4.5K
3072 = 3K
(Bytes)
provides the configurations for the
Remainder RAM for
User Application
(Bytes)
7.625K
7.25K
6.5K
3.5K
5K
31

Related parts for AN2700