Figure 5 แสดง the buffer and descriptor allocation model ใน memory สำหรับ the STM32F4x7 Ethernet driver.

ดังแสดงใน Figure 5, the following arrays ถูกจัดสรรอย่างคงที่ใน the STM32F4x7 Ethernet driver:
• Two arrays สำหรับ the DMA descriptors, อาเรย์หนึ่งสำหรับ DMA Rx และอีกอาเรย์หนึ่งสำหรับ DMA Tx:
ETH_DMADESCTypeDef DMARxDscrTab[ETH_RXBUFNB],
DMATxDscrTab[ETH_TXBUFNB];
• Two arrays ของ driver buffers, array หนึ่งสำหรับ receive buffers และอีก array หนึ่งสำหรับ transmit buffers:
uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE];
uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE];
โดยที่:
– ETH_RXBUFNB: จำนวนของ driver receive buffers
– ETH_TXBUFNB: จำนวนของ driver transmit buffers
– ETH_RX_BUF_SIZE: ขนาดเป็นไบต์ของ a receive buffer
– ETH_TX_BUF_SIZE: ขนาดเป็นไบต์ของ a transmit buffer
ค่าโดยเริ่มต้นสำหรับ parameters เหล่านี้ดังที่กำหนดใน file stm32f4x7_eth.h คือ:
– ETH_RXBUFNB = 4
– ETH_TXBUFNB = 2
– ETH_RX_BUF_SIZE = 1524 (max size of Ethernet packet (1522) + 2 bytes for 32-bit alignment)
– ETH_TX_BUF_SIZE = 1524 (max size of Ethernet packet (1522) + 2 bytes for 32-bit alignment)
The above parameter values สามารถถูกเปลี่ยนขึ้นอยู่กับ user specific application needs. นี้สามารถถูกทำโดยการเปิดใช้งาน
CUSTOM_DRIVER_BUFFERS_CONFIG และเขียนค่าที่กำหนดเองใน the stm32f4x7_eth_conf.h configuration file.
Note: The Ethernet driver อนุญาตให้มี a buffer size (ETH_RX_BUF_SIZE หรือ ETH_TX_BUF_SIZE) ที่ไม่เกิน the
maximum Ethernet packet size (1522 bytes). Ethernet packets (ที่รับหรือที่จะถูกส่ง) ที่เกิน the configured buffer
size จะทอดข้ามครอบคลุมไปหลาย buffers (หรือ descriptors).