friendev EtherDune TCP/IP library
Macros
ENC28J60 Hardware configuration

ENC28J60 memory segmentation and internal buffer sizes. More...

Macros

#define MAX_FRAMELEN   1500
 max frame length which the conroller will accept: (note: maximum ethernet frame length would be 1518) More...
 
#define RXBUFFER_SIZE   3072
 size of the receive buffer size. More...
 
#define TXBUFFER_SIZE   1024
 size of the transmit buffer size. More...
 

Detailed Description

ENC28J60 memory segmentation and internal buffer sizes.

Buffer boundaries applied to internal 8K ram. The default configuration allocates the entire available packet buffer space.

RX buffer: packets are received here in a circular buffer fashion. The larger this buffer, the more packets that can be waiting for processing. The default allows for approximately two ethernet frames. However, EtherDune will request the other end to send packets as small as possible given memory is limited in the microcontroller.

TX buffer: space to assemble an outgoing packet. The larger the buffer, the larger you can have EtherDune send TCP segments out. You should not make this larger than 1500 which is the maximum size of an Ethernet frame anyway.

Shared buffer: This will automatically compute as the remainder: 8192 - RXBUFFER_SIZE - TXBUFFER_SIZE. This is sort of a software-managed circular buffer shared among all sockets. It holds TCP segments that may need to be retransmitted and serves as an assembly area when you call write() on a socket. A minimum of 2048 bytes is recommended.

Macro Definition Documentation

#define MAX_FRAMELEN   1500

max frame length which the conroller will accept: (note: maximum ethernet frame length would be 1518)

Definition at line 128 of file config.h.

#define RXBUFFER_SIZE   3072

size of the receive buffer size.

This determines how large can an outgoing packet be. Make sure it is an even number.

Definition at line 130 of file config.h.

#define TXBUFFER_SIZE   1024

size of the transmit buffer size.

This determines how large can an outgoing packet be.

Definition at line 131 of file config.h.