Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In transmission, the situation is different. The TCP/IP stack knows how much data is being transmitted. In addition to RAM being limited in embedded systems, another feature is the small amount of data that needs to be transmitted. For example, in the case of sensor data to be transmitted periodically, a few hundred bytes every second can be transferred. In this case, a small buffer can be used and save RAM instead of waste a large transmit buffer. Another example is the transmission of TCP acknowledgment packets, especially when they are not carrying any data back to the transmitter. These packets are also small and do not require a large transmit buffer. RAM is also saved.

 


µC/TCP-IP requires that network buffer sizes configured in net_dev_cfg.c satisfy the minimum and maximum packet frame sizes of network interfaces/devices.

...

The listing below shows a sample memory configuration structure.

Code Block
languagecpp
themeConfluence
firstline1
titleSample memory configuration
linenumberstrue
const  NET_DEV_CFG  NetDev_Cfg_Dev1 = {
                           /* Structure member:                                           */
    NET_IF_MEM_TYPE_MAIN,  /*     .RxBufPoolType                                          */ (1)
    1518u,                 /*     .RxBufLargeSize                                         */ (2)
       9u,                 /*     .RxBufLargeNbr                                          */ (3)
      16u,                 /*     .RxBufAlignOctets                                       */ (4)
       0u,                 /*     .RxBufIxOffset                                          */ (5)

    NET_IF_MEM_TYPE_MAIN,  /*     .TxBufPoolType                                          */ (6)
    1606u,                 /*     .TxBufLargeSize                                         */ (7)
       4u,                 /*     .TxBufLargeNbr                                          */ (8)
      64u,                 /*     .TxBufSmallSize                                         */ (9)
       2u,                 /*     .TxBufSmallNbr                                          */ (10)
      16u,                 /*     .TxBufAlignOctets                                       */ (11)
       0u,                 /*     .TxBufIxOffset                                          */ (12)

    0x00000000u,           /*     .MemAddr                                                */ (13)
             0u,           /*     .MemSize                                                */ (14)

    NET_DEV_CFG_FLAG_NONE, /*     .Flag                                                   */ (15)
};



Ethernet Device Configuration

...