Go to the documentation of this file.
31 #ifndef _MIMXRT1170_ETH3_DRIVER_H
32 #define _MIMXRT1170_ETH3_DRIVER_H
35 #ifndef MIMXRT1170_ETH3_TX_BUFFER_COUNT
36 #define MIMXRT1170_ETH3_TX_BUFFER_COUNT 8
37 #elif (MIMXRT1170_ETH3_TX_BUFFER_COUNT < 1)
38 #error MIMXRT1170_ETH3_TX_BUFFER_COUNT parameter is not valid
42 #ifndef MIMXRT1170_ETH3_TX_BUFFER_SIZE
43 #define MIMXRT1170_ETH3_TX_BUFFER_SIZE 1536
44 #elif (MIMXRT1170_ETH3_TX_BUFFER_SIZE != 1536)
45 #error MIMXRT1170_ETH3_TX_BUFFER_SIZE parameter is not valid
49 #ifndef MIMXRT1170_ETH3_RX_BUFFER_COUNT
50 #define MIMXRT1170_ETH3_RX_BUFFER_COUNT 8
51 #elif (MIMXRT1170_ETH3_RX_BUFFER_COUNT < 1)
52 #error MIMXRT1170_ETH3_RX_BUFFER_COUNT parameter is not valid
56 #ifndef MIMXRT1170_ETH3_RX_BUFFER_SIZE
57 #define MIMXRT1170_ETH3_RX_BUFFER_SIZE 1536
58 #elif (MIMXRT1170_ETH3_RX_BUFFER_SIZE != 1536)
59 #error MIMXRT1170_ETH3_RX_BUFFER_SIZE parameter is not valid
63 #ifndef MIMXRT1170_ETH3_IRQ_PRIORITY_GROUPING
64 #define MIMXRT1170_ETH3_IRQ_PRIORITY_GROUPING 3
65 #elif (MIMXRT1170_ETH3_IRQ_PRIORITY_GROUPING < 0)
66 #error MIMXRT1170_ETH3_IRQ_PRIORITY_GROUPING parameter is not valid
70 #ifndef MIMXRT1170_ETH3_IRQ_GROUP_PRIORITY
71 #define MIMXRT1170_ETH3_IRQ_GROUP_PRIORITY 12
72 #elif (MIMXRT1170_ETH3_IRQ_GROUP_PRIORITY < 0)
73 #error MIMXRT1170_ETH3_IRQ_GROUP_PRIORITY parameter is not valid
77 #ifndef MIMXRT1170_ETH3_IRQ_SUB_PRIORITY
78 #define MIMXRT1170_ETH3_IRQ_SUB_PRIORITY 0
79 #elif (MIMXRT1170_ETH3_IRQ_SUB_PRIORITY < 0)
80 #error MIMXRT1170_ETH3_IRQ_SUB_PRIORITY parameter is not valid
84 #ifndef MIMXRT1170_ETH3_RAM_SECTION
85 #define MIMXRT1170_ETH3_RAM_SECTION ".ram_no_cache"
89 #define ENET_TDES0_BUF1AP 0xFFFFFFFF
90 #define ENET_TDES1_BUF2AP 0xFFFFFFFF
91 #define ENET_TDES2_IOC 0x80000000
92 #define ENET_TDES2_TTSE 0x40000000
93 #define ENET_TDES2_B2L 0x3FFF0000
94 #define ENET_TDES2_VTIR 0x0000C000
95 #define ENET_TDES2_B1L 0x00003FFF
96 #define ENET_TDES3_OWN 0x80000000
97 #define ENET_TDES3_CTXT 0x40000000
98 #define ENET_TDES3_FD 0x20000000
99 #define ENET_TDES3_LD 0x10000000
100 #define ENET_TDES3_CPC 0x0C000000
101 #define ENET_TDES3_SAIC 0x03800000
102 #define ENET_TDES3_SLOTNUM_THL 0x00780000
103 #define ENET_TDES3_TSE 0x00040000
104 #define ENET_TDES3_CIC 0x00030000
105 #define ENET_TDES3_FL 0x00007FFF
106 #define ENET_TDES3_TPL 0w0003FFFF
109 #define ENET_TDES0_TTSL 0xFFFFFFFF
110 #define ENET_TDES1_TTSH 0xFFFFFFFF
111 #define ENET_TDES3_OWN 0x80000000
112 #define ENET_TDES3_CTXT 0x40000000
113 #define ENET_TDES3_FD 0x20000000
114 #define ENET_TDES3_LD 0x10000000
115 #define ENET_TDES3_TTSS 0x00020000
116 #define ENET_TDES3_ES 0x00008000
117 #define ENET_TDES3_JT 0x00004000
118 #define ENET_TDES3_FF 0x00002000
119 #define ENET_TDES3_PCE 0x00001000
120 #define ENET_TDES3_LOC 0x00000800
121 #define ENET_TDES3_NC 0x00000400
122 #define ENET_TDES3_LC 0x00000200
123 #define ENET_TDES3_EC 0x00000100
124 #define ENET_TDES3_CC 0x000000F0
125 #define ENET_TDES3_ED 0x00000008
126 #define ENET_TDES3_UF 0x00000004
127 #define ENET_TDES3_DB 0x00000002
128 #define ENET_TDES3_IHE 0x00000001
131 #define ENET_TDES0_TTSL 0xFFFFFFFF
132 #define ENET_TDES1_TTSH 0xFFFFFFFF
133 #define ENET_TDES2_IVT 0xFFFF0000
134 #define ENET_TDES2_MSS 0x00003FFF
135 #define ENET_TDES3_OWN 0x80000000
136 #define ENET_TDES3_CTXT 0x40000000
137 #define ENET_TDES3_OSTC 0x08000000
138 #define ENET_TDES3_TCMSSV 0x04000000
139 #define ENET_TDES3_CDE 0x00800000
140 #define ENET_TDES3_IVLTV 0x00020000
141 #define ENET_TDES3_VLTV 0x00010000
142 #define ENET_TDES3_VT 0x0000FFFF
145 #define ENET_RDES0_BUF1AP 0xFFFFFFFF
146 #define ENET_RDES2_BUF2AP 0xFFFFFFFF
147 #define ENET_RDES3_OWN 0x80000000
148 #define ENET_RDES3_IOC 0x40000000
149 #define ENET_RDES3_BUF2V 0x02000000
150 #define ENET_RDES3_BUF1V 0x01000000
153 #define ENET_RDES0_IVT 0xFFFF0000
154 #define ENET_RDES0_OVT 0x0000FFFF
155 #define ENET_RDES1_OPC 0xFFFF0000
156 #define ENET_RDES1_TD 0x00008000
157 #define ENET_RDES1_TSA 0x00004000
158 #define ENET_RDES1_PV 0x00002000
159 #define ENET_RDES1_PFT 0x00001000
160 #define ENET_RDES1_PMT 0x00000F00
161 #define ENET_RDES1_IPCE 0x00000080
162 #define ENET_RDES1_IPCB 0x00000040
163 #define ENET_RDES1_IPV6 0x00000020
164 #define ENET_RDES1_IPV4 0x00000010
165 #define ENET_RDES1_IPHE 0x00000008
166 #define ENET_RDES1_PT 0x00000007
167 #define ENET_RDES2_L3L4FM 0xE0000000
168 #define ENET_RDES2_L4FM 0x10000000
169 #define ENET_RDES2_L3FM 0x08000000
170 #define ENET_RDES2_MADRM 0x07F80000
171 #define ENET_RDES2_HF 0x00040000
172 #define ENET_RDES2_DAF 0x00020000
173 #define ENET_RDES2_SAF 0x00010000
174 #define ENET_RDES2_OTS 0x00008000
175 #define ENET_RDES2_ITS 0x00004000
176 #define ENET_RDES2_ARPRN 0x00000400
177 #define ENET_RDES2_HL 0x000003FF
178 #define ENET_RDES3_OWN 0x80000000
179 #define ENET_RDES3_CTXT 0x40000000
180 #define ENET_RDES3_FD 0x20000000
181 #define ENET_RDES3_LD 0x10000000
182 #define ENET_RDES3_RS2V 0x08000000
183 #define ENET_RDES3_RS1V 0x04000000
184 #define ENET_RDES3_RS0V 0x02000000
185 #define ENET_RDES3_CE 0x01000000
186 #define ENET_RDES3_GP 0x00800000
187 #define ENET_RDES3_RWT 0x00400000
188 #define ENET_RDES3_OE 0x00200000
189 #define ENET_RDES3_RE 0x00100000
190 #define ENET_RDES3_DE 0x00080000
191 #define ENET_RDES3_LT 0x00070000
192 #define ENET_RDES3_ES 0x00008000
193 #define ENET_RDES3_PL 0x00007FFF
196 #define ENET_RDES0_RTSL 0xFFFFFFFF
197 #define ENET_RDES1_RTSH 0xFFFFFFFF
198 #define ENET_RDES3_OWN 0x80000000
199 #define ENET_RDES3_CTXT 0x40000000
void mimxrt1170Eth3Tick(NetInterface *interface)
i.MX RT1170 Ethernet MAC timer handler
Structure describing a buffer that spans multiple chunks.
error_t mimxrt1170Eth3Init(NetInterface *interface)
i.MX RT1170 Ethernet MAC initialization
void mimxrt1170Eth3InitDmaDesc(NetInterface *interface)
Initialize buffer descriptors.
error_t mimxrt1170Eth3UpdateMacConfig(NetInterface *interface)
Adjust MAC configuration parameters for proper operation.
const NicDriver mimxrt1170Eth3Driver
i.MX RT1170 Ethernet MAC driver (ENET_QOS instance)
error_t mimxrt1170Eth3ReceivePacket(NetInterface *interface)
Receive a packet.
void mimxrt1170Eth3InitGpio(NetInterface *interface)
GPIO configuration.
uint16_t mimxrt1170Eth3ReadPhyReg(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr)
Read PHY register.
error_t mimxrt1170Eth3SendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
void mimxrt1170Eth3DisableIrq(NetInterface *interface)
Disable interrupts.
void mimxrt1170Eth3WritePhyReg(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
Write PHY register.
void mimxrt1170Eth3EventHandler(NetInterface *interface)
i.MX RT1170 Ethernet MAC event handler
void mimxrt1170Eth3EnableIrq(NetInterface *interface)
Enable interrupts.
error_t mimxrt1170Eth3UpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.