fruma
Uploaded by
15 SLIDES
273 VUES
150LIKES

Understanding Ethernet Protocol Stack and NE2000-Compatible Chip Configuration

DESCRIPTION

This guide delves into the Ethernet protocol stack, focusing on ARP, Internet protocols, routing, and HTTP, with a specific emphasis on the NE2000-compatible Ethernet chip configuration. It covers critical aspects such as buffer size definitions, memory organization, and timing for data read/write operations. Key parameters like TXSTART, RXSTART, and RXSTOP are explained in detail, including how they are utilized and adjusted for packet transmission and reception. The document serves as a foundational resource for developers working with Ethernet networks and MCU integration.

1 / 15

Télécharger la présentation

Understanding Ethernet Protocol Stack and NE2000-Compatible Chip Configuration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript

Playing audio...

  1. 51MCU+Ethernet

  2. Protocol Stack

  3. Ethernet Frame

  4. ARP Protocol

  5. Internet

  6. IP Routing

  7. ICMP-Ping

  8. HTTP

  9. Ethernet 晶片-NE2000 Compatiable

  10. Memory Organization

  11. The Connection

  12. Read/Write Timing

  13. Driver 變數 • #define MAC_TX_BUFFER_SIZE (1024) //定義每一傳送封包最大Size • #define MAC_TX_BUFFER_COUNT (1) //定義幾個傳送封包的Buffer • #define NIC_PAGE_SIZE ( 256) //定義網卡每一個page等於256 bytes • // ( 此大小由網卡網卡硬體結構決定) • #define RAMPAGES (0x20) //網卡內建0x20(32) pages • // ( 此大小由網卡網卡硬體結構決定) • #define TXSTART (0x40) //網卡的傳送啟始頁(RAMPAGES由 此 • 開始往下到[0x20+0x40-1]結束) • #define TXPAGES (MAC_TX_BUFFER_COUNT * (MAC_TX_BUFFER_SIZE/NIC_PAGE_SIZE)) • #define RXSTART (TXSTART+TXPAGES) //網卡的接收起始頁 • #define RXSTOP (TXSTART+RAMPAGES-1) //網卡的糾收結束頁 • #define RXPAGES (RXSTOP - RXSTART) //定義網有多少接收page • // (PS.感覺RXSTOP-RXSTART比起實際的會少一頁) • // (需再仔細探討)

  14. RTL8019AS Ethernet Chip TXSTART、RXSTART、RXSTOP 這三個初始化後,將固定不動 CURRP 初始化後,當開始接收封包時,網卡會依據收到的封包調整此暫存器之數值 BNRY 初始化後,當使用者從Receive Buffer拿走資料後,要將其空間釋放給網卡繼續接收封包時,必須有使用者自行修改新的數值

  15. MCU 變數管理 NICReadPtr; 指向下一個新的receive packet所在網卡page number NICCurrentRdPtr 目前正在讀取的Receive packet起始page number NICCurrentTxBuffer 指定目前正在使用的Tx Buffer為規劃中的哪一塊

More Related