AN2700 Freescale Semiconductor / Motorola, AN2700 Datasheet - Page 34

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
CMX-MicroNet Project Configuration to Optimize the Stack Solution
Figure 15
illustrates a simplified or partial TCP/IP stack implementation. This stack uses only the UDP
protocol and the user applications.
USER APPLICATION
UDP
ARP
IP
NETWORK INTERFACE
Figure 15. Partial Stack TCP/IP Stack Implementation
The major disadvantage of TCP/IP stack implementations that are customized to a specific application is
that they are not complete TCP/IP stack implementations. So, if changes to the TCP stack functionality
are required after product deployment, making updates would require recompiling the TCP stack code to
include the missing components and reprogramming the device in the field.
CMX-Micronet Zero Copy Functionality
Zero Copy refers to the TCP/IP stack's ability to send and receive from the Ethernet buffers’ stack without
copying data to user RAM. CMX's zero copy functionality was introduced in CMX-Micronet version 3.03
to optimize RAM usage with the MC9S12NE64. The zero copy mode of the CMX stack can be disabled
if the user chooses. Because the MC9S12NE64 has an integrated Ethernet buffer, there is no need to
make a second copy of the Ethernet buffers. Instead, these Ethernet buffers can be directly accessed.
Not making a copy of the data saves user RAM space and improves performance. Performance is
improved because, in most cases, the data can be completely processed in much less of time that would
be required to make a copy of the data between the user RAM and Ethernet buffer RAM. It is possible
that enabling zero copy could cause the HTTP server to drop packets because, in zero copy mode, only
two incoming packets will be stored at the same time.
To enable zero copy mode in the CMX-MicroNet TCP/IP stack, the USE_SEND_BUFF and
USE_RECV_BUFF variables in mn_env.h of the netlib directory must be cleared to 0. If set to 1,
CMX-MicroNet makes a copy of data in the Tx and Rx Ethernet buffers in user RAM.
Set Buffer to Appropriate Values
RAM for Tx and Rx Ethernet buffers should be balanced with user application RAM. If large Ethernet
buffers are not required for the user application, set the Ethernet buffer values (in the BUFMAP register)
so that the user application uses only the necessary RAM resources. The Tx and Rx Ethernet buffer sizes
are controlled in emac_fifo_cfg.h and _MC9S12NE64_BANKED.prm .
Basic Web Server with MC9S12NE64 and CMX-MicroNet TCP/IP Stack, Rev. 0.3
34
Freescale Semiconductor

Related parts for AN2700