Network Component  Version 6.6
MDK-Professional Middleware for IP Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Resource Requirements

This section describes the resource requirements of the Network component. The actual requirements depend on the features used in the application. Therefore, the numbers provided here are guidelines only and the actual numbers may differ.

Stack Requirements

The Network Core receives events sent from the interrupt service routine (ISR) of the Ethernet (or Serial) Driver. The stack requirements for the ISR are typically less than 512 Bytes. The total stack space required for ISR depends on the interrupt nesting and therefore on the priority settings of these ISR. The stack requirements for ISR is configured in the startup_device.s file located under the Device component class.

Option (under section Stack Configuration) Increase Value by
Stack Size (in Bytes) + 512 for Ethernet (or Serial) Driver
Note
When using a CMSIS-RTOS, the Stack Size in the startup_device.s file configures only the stack space that is used by exception and interrupt service routines of the drivers. The stack size requirements depend on the maximum nesting of exception and ISR execution and therefore on the priority settings of the various interrupt and exception sources.

User code that calls API functions of the Network Component should have a minimum of 512 Bytes of stack space available. Since API functions are frequently called from threads, the thread stack size should be at least 512 Bytes (see below).

CMSIS-RTOS Requirements

The Network component uses a single CMSIS-RTOS thread (eth_thread) when Ethernet Interface is enabled. This thread executes with priority osPriorityHigh and uses the default thread stack.

The thread requirements need to be reflected in the CMSIS-RTOS configuration. Refer to the CMSIS-RTOS Reference for further details.

For CMSIS-RTOS RTX, the threads requirements are configured in the RTX_Conf_CM.c file located under the CMSIS component class:

Option (under section Thread Configuration) Value
Number of concurrent running threads + 1
Default Thread stack size [bytes] at least 512

System Configuration

The ::Network:Core component requires User Timers to be selected. The Timer Thread Stack is commonly used by all threads working with User Timers. Depending on the application and the further usage of the timers, the Timer Thread stack size needs to be increased accordingly.

Signals

When using BSD sockets in blocking mode, the signal (1<<15) in that thread is reserved for the Network library. A user thread, when blocked on BSD sockets, is waiting for the signal 0x8000 to resume. The event, which has caused the thread to resume, is provided internally in the library. Therefore, signal 0x8000 must not be used by the user application in that thread.

Memory Requirements

The following table shows the memory requirements for read-only (Flash) and read-write (RAM) memory. These numbers may be used to estimate the total size requirements of the application, but the actual numbers depend on compiler optimizations and target processor and may be therefore slightly different.

Component RO Memory [Bytes] RW Memory (Data) [Bytes]
::Network:Core 3.5 k 0.2 k + Memory Pool size (configured in Net_Config.c)
::Network:Interface:ETH (with ARP, IGMP, DHCP, NBNS) 6.7 k 0.2 k
::Network:Interface:PPP (with CHAP/PAP and Modem) 8.4 k 0.5 k
::Network:Interface:SLIP (with Modem) 2.3 k 0.4 k
::Network:Socket:UDP 0.9 k 0.1 k
::Network:Socket:TCP 4.5 k 0.4 k
::Network:Socket:BSD (without UDP/TCP) 3.5 k 0.1 k
::Network:Service:DNS Client 1.3 k 0.3 k
::Network:Service:FTP Client 2.4 k < 0.1 k
::Network:Service:FTP Server 4.5 k 0.1 k
::Network:Service:SMTP Client 1.5 k < 0.1 k
::Network:Service:SNMP Agent 2.4 k < 0.1 k
::Network:Service:SNTP Client 0.4 k < 0.1 k
::Network:Service:TFTP Client 1.3 k < 0.1 k
::Network:Service:TFTP Server 1.9 k 0.1 k
::Network:Service:Telnet Server 2.5 k 0.4 k
::Network:Service:Web Server (HTTP Server) 6.6 k 0.2 k
Ethernet MAC Driver 1 .. 4 k 0 .. 10 k
Ethernet PHY Driver < 1 k < 0.1 k