30 #ifndef _SAM3XA_EMAC_COMPONENT_ 31 #define _SAM3XA_EMAC_COMPONENT_ 39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) 46 #define EMACSA_NUMBER 4 92 #define EMAC_NCR_LB (0x1u << 0) 93 #define EMAC_NCR_LLB (0x1u << 1) 94 #define EMAC_NCR_RE (0x1u << 2) 95 #define EMAC_NCR_TE (0x1u << 3) 96 #define EMAC_NCR_MPE (0x1u << 4) 97 #define EMAC_NCR_CLRSTAT (0x1u << 5) 98 #define EMAC_NCR_INCSTAT (0x1u << 6) 99 #define EMAC_NCR_WESTAT (0x1u << 7) 100 #define EMAC_NCR_BP (0x1u << 8) 101 #define EMAC_NCR_TSTART (0x1u << 9) 102 #define EMAC_NCR_THALT (0x1u << 10) 104 #define EMAC_NCFGR_SPD (0x1u << 0) 105 #define EMAC_NCFGR_FD (0x1u << 1) 106 #define EMAC_NCFGR_JFRAME (0x1u << 3) 107 #define EMAC_NCFGR_CAF (0x1u << 4) 108 #define EMAC_NCFGR_NBC (0x1u << 5) 109 #define EMAC_NCFGR_MTI (0x1u << 6) 110 #define EMAC_NCFGR_UNI (0x1u << 7) 111 #define EMAC_NCFGR_BIG (0x1u << 8) 112 #define EMAC_NCFGR_CLK_Pos 10 113 #define EMAC_NCFGR_CLK_Msk (0x3u << EMAC_NCFGR_CLK_Pos) 114 #define EMAC_NCFGR_CLK_MCK_8 (0x0u << 10) 115 #define EMAC_NCFGR_CLK_MCK_16 (0x1u << 10) 116 #define EMAC_NCFGR_CLK_MCK_32 (0x2u << 10) 117 #define EMAC_NCFGR_CLK_MCK_64 (0x3u << 10) 118 #define EMAC_NCFGR_RTY (0x1u << 12) 119 #define EMAC_NCFGR_PAE (0x1u << 13) 120 #define EMAC_NCFGR_RBOF_Pos 14 121 #define EMAC_NCFGR_RBOF_Msk (0x3u << EMAC_NCFGR_RBOF_Pos) 122 #define EMAC_NCFGR_RBOF_OFFSET_0 (0x0u << 14) 123 #define EMAC_NCFGR_RBOF_OFFSET_1 (0x1u << 14) 124 #define EMAC_NCFGR_RBOF_OFFSET_2 (0x2u << 14) 125 #define EMAC_NCFGR_RBOF_OFFSET_3 (0x3u << 14) 126 #define EMAC_NCFGR_RLCE (0x1u << 16) 127 #define EMAC_NCFGR_DRFCS (0x1u << 17) 128 #define EMAC_NCFGR_EFRHD (0x1u << 18) 129 #define EMAC_NCFGR_IRXFCS (0x1u << 19) 131 #define EMAC_NSR_MDIO (0x1u << 1) 132 #define EMAC_NSR_IDLE (0x1u << 2) 134 #define EMAC_TSR_UBR (0x1u << 0) 135 #define EMAC_TSR_COL (0x1u << 1) 136 #define EMAC_TSR_RLES (0x1u << 2) 137 #define EMAC_TSR_TGO (0x1u << 3) 138 #define EMAC_TSR_BEX (0x1u << 4) 139 #define EMAC_TSR_COMP (0x1u << 5) 140 #define EMAC_TSR_UND (0x1u << 6) 142 #define EMAC_RBQP_ADDR_Pos 2 143 #define EMAC_RBQP_ADDR_Msk (0x3fffffffu << EMAC_RBQP_ADDR_Pos) 144 #define EMAC_RBQP_ADDR(value) ((EMAC_RBQP_ADDR_Msk & ((value) << EMAC_RBQP_ADDR_Pos))) 146 #define EMAC_TBQP_ADDR_Pos 2 147 #define EMAC_TBQP_ADDR_Msk (0x3fffffffu << EMAC_TBQP_ADDR_Pos) 148 #define EMAC_TBQP_ADDR(value) ((EMAC_TBQP_ADDR_Msk & ((value) << EMAC_TBQP_ADDR_Pos))) 150 #define EMAC_RSR_BNA (0x1u << 0) 151 #define EMAC_RSR_REC (0x1u << 1) 152 #define EMAC_RSR_OVR (0x1u << 2) 154 #define EMAC_ISR_MFD (0x1u << 0) 155 #define EMAC_ISR_RCOMP (0x1u << 1) 156 #define EMAC_ISR_RXUBR (0x1u << 2) 157 #define EMAC_ISR_TXUBR (0x1u << 3) 158 #define EMAC_ISR_TUND (0x1u << 4) 159 #define EMAC_ISR_RLEX (0x1u << 5) 160 #define EMAC_ISR_TXERR (0x1u << 6) 161 #define EMAC_ISR_TCOMP (0x1u << 7) 162 #define EMAC_ISR_ROVR (0x1u << 10) 163 #define EMAC_ISR_HRESP (0x1u << 11) 164 #define EMAC_ISR_PFRE (0x1u << 12) 165 #define EMAC_ISR_PTZ (0x1u << 13) 167 #define EMAC_IER_MFD (0x1u << 0) 168 #define EMAC_IER_RCOMP (0x1u << 1) 169 #define EMAC_IER_RXUBR (0x1u << 2) 170 #define EMAC_IER_TXUBR (0x1u << 3) 171 #define EMAC_IER_TUND (0x1u << 4) 172 #define EMAC_IER_RLE (0x1u << 5) 173 #define EMAC_IER_TXERR (0x1u << 6) 174 #define EMAC_IER_TCOMP (0x1u << 7) 175 #define EMAC_IER_ROVR (0x1u << 10) 176 #define EMAC_IER_HRESP (0x1u << 11) 177 #define EMAC_IER_PFR (0x1u << 12) 178 #define EMAC_IER_PTZ (0x1u << 13) 180 #define EMAC_IDR_MFD (0x1u << 0) 181 #define EMAC_IDR_RCOMP (0x1u << 1) 182 #define EMAC_IDR_RXUBR (0x1u << 2) 183 #define EMAC_IDR_TXUBR (0x1u << 3) 184 #define EMAC_IDR_TUND (0x1u << 4) 185 #define EMAC_IDR_RLE (0x1u << 5) 186 #define EMAC_IDR_TXERR (0x1u << 6) 187 #define EMAC_IDR_TCOMP (0x1u << 7) 188 #define EMAC_IDR_ROVR (0x1u << 10) 189 #define EMAC_IDR_HRESP (0x1u << 11) 190 #define EMAC_IDR_PFR (0x1u << 12) 191 #define EMAC_IDR_PTZ (0x1u << 13) 193 #define EMAC_IMR_MFD (0x1u << 0) 194 #define EMAC_IMR_RCOMP (0x1u << 1) 195 #define EMAC_IMR_RXUBR (0x1u << 2) 196 #define EMAC_IMR_TXUBR (0x1u << 3) 197 #define EMAC_IMR_TUND (0x1u << 4) 198 #define EMAC_IMR_RLE (0x1u << 5) 199 #define EMAC_IMR_TXERR (0x1u << 6) 200 #define EMAC_IMR_TCOMP (0x1u << 7) 201 #define EMAC_IMR_ROVR (0x1u << 10) 202 #define EMAC_IMR_HRESP (0x1u << 11) 203 #define EMAC_IMR_PFR (0x1u << 12) 204 #define EMAC_IMR_PTZ (0x1u << 13) 206 #define EMAC_MAN_DATA_Pos 0 207 #define EMAC_MAN_DATA_Msk (0xffffu << EMAC_MAN_DATA_Pos) 208 #define EMAC_MAN_DATA(value) ((EMAC_MAN_DATA_Msk & ((value) << EMAC_MAN_DATA_Pos))) 209 #define EMAC_MAN_CODE_Pos 16 210 #define EMAC_MAN_CODE_Msk (0x3u << EMAC_MAN_CODE_Pos) 211 #define EMAC_MAN_CODE(value) ((EMAC_MAN_CODE_Msk & ((value) << EMAC_MAN_CODE_Pos))) 212 #define EMAC_MAN_REGA_Pos 18 213 #define EMAC_MAN_REGA_Msk (0x1fu << EMAC_MAN_REGA_Pos) 214 #define EMAC_MAN_REGA(value) ((EMAC_MAN_REGA_Msk & ((value) << EMAC_MAN_REGA_Pos))) 215 #define EMAC_MAN_PHYA_Pos 23 216 #define EMAC_MAN_PHYA_Msk (0x1fu << EMAC_MAN_PHYA_Pos) 217 #define EMAC_MAN_PHYA(value) ((EMAC_MAN_PHYA_Msk & ((value) << EMAC_MAN_PHYA_Pos))) 218 #define EMAC_MAN_RW_Pos 28 219 #define EMAC_MAN_RW_Msk (0x3u << EMAC_MAN_RW_Pos) 220 #define EMAC_MAN_RW(value) ((EMAC_MAN_RW_Msk & ((value) << EMAC_MAN_RW_Pos))) 221 #define EMAC_MAN_SOF_Pos 30 222 #define EMAC_MAN_SOF_Msk (0x3u << EMAC_MAN_SOF_Pos) 223 #define EMAC_MAN_SOF(value) ((EMAC_MAN_SOF_Msk & ((value) << EMAC_MAN_SOF_Pos))) 225 #define EMAC_PTR_PTIME_Pos 0 226 #define EMAC_PTR_PTIME_Msk (0xffffu << EMAC_PTR_PTIME_Pos) 227 #define EMAC_PTR_PTIME(value) ((EMAC_PTR_PTIME_Msk & ((value) << EMAC_PTR_PTIME_Pos))) 229 #define EMAC_PFR_FROK_Pos 0 230 #define EMAC_PFR_FROK_Msk (0xffffu << EMAC_PFR_FROK_Pos) 231 #define EMAC_PFR_FROK(value) ((EMAC_PFR_FROK_Msk & ((value) << EMAC_PFR_FROK_Pos))) 233 #define EMAC_FTO_FTOK_Pos 0 234 #define EMAC_FTO_FTOK_Msk (0xffffffu << EMAC_FTO_FTOK_Pos) 235 #define EMAC_FTO_FTOK(value) ((EMAC_FTO_FTOK_Msk & ((value) << EMAC_FTO_FTOK_Pos))) 237 #define EMAC_SCF_SCF_Pos 0 238 #define EMAC_SCF_SCF_Msk (0xffffu << EMAC_SCF_SCF_Pos) 239 #define EMAC_SCF_SCF(value) ((EMAC_SCF_SCF_Msk & ((value) << EMAC_SCF_SCF_Pos))) 241 #define EMAC_MCF_MCF_Pos 0 242 #define EMAC_MCF_MCF_Msk (0xffffu << EMAC_MCF_MCF_Pos) 243 #define EMAC_MCF_MCF(value) ((EMAC_MCF_MCF_Msk & ((value) << EMAC_MCF_MCF_Pos))) 245 #define EMAC_FRO_FROK_Pos 0 246 #define EMAC_FRO_FROK_Msk (0xffffffu << EMAC_FRO_FROK_Pos) 247 #define EMAC_FRO_FROK(value) ((EMAC_FRO_FROK_Msk & ((value) << EMAC_FRO_FROK_Pos))) 249 #define EMAC_FCSE_FCSE_Pos 0 250 #define EMAC_FCSE_FCSE_Msk (0xffu << EMAC_FCSE_FCSE_Pos) 251 #define EMAC_FCSE_FCSE(value) ((EMAC_FCSE_FCSE_Msk & ((value) << EMAC_FCSE_FCSE_Pos))) 253 #define EMAC_ALE_ALE_Pos 0 254 #define EMAC_ALE_ALE_Msk (0xffu << EMAC_ALE_ALE_Pos) 255 #define EMAC_ALE_ALE(value) ((EMAC_ALE_ALE_Msk & ((value) << EMAC_ALE_ALE_Pos))) 257 #define EMAC_DTF_DTF_Pos 0 258 #define EMAC_DTF_DTF_Msk (0xffffu << EMAC_DTF_DTF_Pos) 259 #define EMAC_DTF_DTF(value) ((EMAC_DTF_DTF_Msk & ((value) << EMAC_DTF_DTF_Pos))) 261 #define EMAC_LCOL_LCOL_Pos 0 262 #define EMAC_LCOL_LCOL_Msk (0xffu << EMAC_LCOL_LCOL_Pos) 263 #define EMAC_LCOL_LCOL(value) ((EMAC_LCOL_LCOL_Msk & ((value) << EMAC_LCOL_LCOL_Pos))) 265 #define EMAC_ECOL_EXCOL_Pos 0 266 #define EMAC_ECOL_EXCOL_Msk (0xffu << EMAC_ECOL_EXCOL_Pos) 267 #define EMAC_ECOL_EXCOL(value) ((EMAC_ECOL_EXCOL_Msk & ((value) << EMAC_ECOL_EXCOL_Pos))) 269 #define EMAC_TUND_TUND_Pos 0 270 #define EMAC_TUND_TUND_Msk (0xffu << EMAC_TUND_TUND_Pos) 271 #define EMAC_TUND_TUND(value) ((EMAC_TUND_TUND_Msk & ((value) << EMAC_TUND_TUND_Pos))) 273 #define EMAC_CSE_CSE_Pos 0 274 #define EMAC_CSE_CSE_Msk (0xffu << EMAC_CSE_CSE_Pos) 275 #define EMAC_CSE_CSE(value) ((EMAC_CSE_CSE_Msk & ((value) << EMAC_CSE_CSE_Pos))) 277 #define EMAC_RRE_RRE_Pos 0 278 #define EMAC_RRE_RRE_Msk (0xffffu << EMAC_RRE_RRE_Pos) 279 #define EMAC_RRE_RRE(value) ((EMAC_RRE_RRE_Msk & ((value) << EMAC_RRE_RRE_Pos))) 281 #define EMAC_ROV_ROVR_Pos 0 282 #define EMAC_ROV_ROVR_Msk (0xffu << EMAC_ROV_ROVR_Pos) 283 #define EMAC_ROV_ROVR(value) ((EMAC_ROV_ROVR_Msk & ((value) << EMAC_ROV_ROVR_Pos))) 285 #define EMAC_RSE_RSE_Pos 0 286 #define EMAC_RSE_RSE_Msk (0xffu << EMAC_RSE_RSE_Pos) 287 #define EMAC_RSE_RSE(value) ((EMAC_RSE_RSE_Msk & ((value) << EMAC_RSE_RSE_Pos))) 289 #define EMAC_ELE_EXL_Pos 0 290 #define EMAC_ELE_EXL_Msk (0xffu << EMAC_ELE_EXL_Pos) 291 #define EMAC_ELE_EXL(value) ((EMAC_ELE_EXL_Msk & ((value) << EMAC_ELE_EXL_Pos))) 293 #define EMAC_RJA_RJB_Pos 0 294 #define EMAC_RJA_RJB_Msk (0xffu << EMAC_RJA_RJB_Pos) 295 #define EMAC_RJA_RJB(value) ((EMAC_RJA_RJB_Msk & ((value) << EMAC_RJA_RJB_Pos))) 297 #define EMAC_USF_USF_Pos 0 298 #define EMAC_USF_USF_Msk (0xffu << EMAC_USF_USF_Pos) 299 #define EMAC_USF_USF(value) ((EMAC_USF_USF_Msk & ((value) << EMAC_USF_USF_Pos))) 301 #define EMAC_STE_SQER_Pos 0 302 #define EMAC_STE_SQER_Msk (0xffu << EMAC_STE_SQER_Pos) 303 #define EMAC_STE_SQER(value) ((EMAC_STE_SQER_Msk & ((value) << EMAC_STE_SQER_Pos))) 305 #define EMAC_RLE_RLFM_Pos 0 306 #define EMAC_RLE_RLFM_Msk (0xffu << EMAC_RLE_RLFM_Pos) 307 #define EMAC_RLE_RLFM(value) ((EMAC_RLE_RLFM_Msk & ((value) << EMAC_RLE_RLFM_Pos))) 309 #define EMAC_HRB_ADDR_Pos 0 310 #define EMAC_HRB_ADDR_Msk (0xffffffffu << EMAC_HRB_ADDR_Pos) 311 #define EMAC_HRB_ADDR(value) ((EMAC_HRB_ADDR_Msk & ((value) << EMAC_HRB_ADDR_Pos))) 313 #define EMAC_HRT_ADDR_Pos 0 314 #define EMAC_HRT_ADDR_Msk (0xffffffffu << EMAC_HRT_ADDR_Pos) 315 #define EMAC_HRT_ADDR(value) ((EMAC_HRT_ADDR_Msk & ((value) << EMAC_HRT_ADDR_Pos))) 317 #define EMAC_SAxB_ADDR_Pos 0 318 #define EMAC_SAxB_ADDR_Msk (0xffffffffu << EMAC_SAxB_ADDR_Pos) 319 #define EMAC_SAxB_ADDR(value) ((EMAC_SAxB_ADDR_Msk & ((value) << EMAC_SAxB_ADDR_Pos))) 321 #define EMAC_SAxT_ADDR_Pos 0 322 #define EMAC_SAxT_ADDR_Msk (0xffffu << EMAC_SAxT_ADDR_Pos) 323 #define EMAC_SAxT_ADDR(value) ((EMAC_SAxT_ADDR_Msk & ((value) << EMAC_SAxT_ADDR_Pos))) 325 #define EMAC_TID_TID_Pos 0 326 #define EMAC_TID_TID_Msk (0xffffu << EMAC_TID_TID_Pos) 327 #define EMAC_TID_TID(value) ((EMAC_TID_TID_Msk & ((value) << EMAC_TID_TID_Pos))) 329 #define EMAC_USRIO_RMII (0x1u << 0) 330 #define EMAC_USRIO_CLKEN (0x1u << 1) RwReg EMAC_FRO
(Emac Offset: 0x4C) Frames Received Ok Register
Definition: component_emac.h:66
RwReg EMAC_RBQP
(Emac Offset: 0x18) Receive Buffer Queue Pointer Register
Definition: component_emac.h:53
RwReg EMAC_SAxB
(EmacSa Offset: 0x0) Specific Address 1 Bottom Register
Definition: component_emac.h:42
#define EMACSA_NUMBER
Emac hardware registers.
Definition: component_emac.h:46
RoReg EMAC_IMR
(Emac Offset: 0x30) Interrupt Mask Register
Definition: component_emac.h:59
RwReg EMAC_LCOL
(Emac Offset: 0x5C) Late Collisions Register
Definition: component_emac.h:70
volatile uint32_t RwReg
Definition: sam3n00a.h:54
RwReg EMAC_ROV
(Emac Offset: 0x70) Receive Overrun Errors Register
Definition: component_emac.h:75
RwReg EMAC_ISR
(Emac Offset: 0x24) Interrupt Status Register
Definition: component_emac.h:56
RwReg EMAC_MAN
(Emac Offset: 0x34) Phy Maintenance Register
Definition: component_emac.h:60
RwReg EMAC_CSE
(Emac Offset: 0x68) Carrier Sense Errors Register
Definition: component_emac.h:73
RwReg EMAC_RRE
(Emac Offset: 0x6C) Receive Resource Errors Register
Definition: component_emac.h:74
RwReg EMAC_USF
(Emac Offset: 0x80) Undersize Frames Register
Definition: component_emac.h:79
RwReg EMAC_FTO
(Emac Offset: 0x40) Frames Transmitted Ok Register
Definition: component_emac.h:63
volatile uint32_t WoReg
Definition: sam3n00a.h:53
RwReg EMAC_HRT
(Emac Offset: 0x94) Hash Register Top [63:32] Register
Definition: component_emac.h:84
RwReg EMAC_TUND
(Emac Offset: 0x64) Transmit Underrun Errors Register
Definition: component_emac.h:72
RwReg EMAC_TBQP
(Emac Offset: 0x1C) Transmit Buffer Queue Pointer Register
Definition: component_emac.h:54
WoReg EMAC_IDR
(Emac Offset: 0x2C) Interrupt Disable Register
Definition: component_emac.h:58
RwReg EMAC_HRB
(Emac Offset: 0x90) Hash Register Bottom [31:0] Register
Definition: component_emac.h:83
RwReg EMAC_ALE
(Emac Offset: 0x54) Alignment Errors Register
Definition: component_emac.h:68
RwReg EMAC_RLE
(Emac Offset: 0x88) Received Length Field Mismatch Register
Definition: component_emac.h:81
RoReg EMAC_NSR
(Emac Offset: 0x08) Network Status Register
Definition: component_emac.h:50
RwReg EMAC_USRIO
(Emac Offset: 0xC0) User Input/Output Register
Definition: component_emac.h:88
RwReg EMAC_SAxT
(EmacSa Offset: 0x4) Specific Address 1 Top Register
Definition: component_emac.h:43
RwReg EMAC_TSR
(Emac Offset: 0x14) Transmit Status Register
Definition: component_emac.h:52
RwReg EMAC_TID
(Emac Offset: 0xB8) Type ID Checking Register
Definition: component_emac.h:86
RwReg EMAC_SCF
(Emac Offset: 0x44) Single Collision Frames Register
Definition: component_emac.h:64
RwReg EMAC_PTR
(Emac Offset: 0x38) Pause Time Register
Definition: component_emac.h:61
EmacSa hardware registers.
Definition: component_emac.h:41
RwReg EMAC_ELE
(Emac Offset: 0x78) Excessive Length Errors Register
Definition: component_emac.h:77
RwReg EMAC_RJA
(Emac Offset: 0x7C) Receive Jabbers Register
Definition: component_emac.h:78
RwReg EMAC_PFR
(Emac Offset: 0x3C) Pause Frames Received Register
Definition: component_emac.h:62
volatile const uint32_t RoReg
Definition: sam3n00a.h:49
RwReg EMAC_STE
(Emac Offset: 0x84) SQE Test Errors Register
Definition: component_emac.h:80
RwReg EMAC_DTF
(Emac Offset: 0x58) Deferred Transmission Frames Register
Definition: component_emac.h:69
Definition: component_emac.h:47
RwReg EMAC_NCR
(Emac Offset: 0x00) Network Control Register
Definition: component_emac.h:48
RwReg EMAC_FCSE
(Emac Offset: 0x50) Frame Check Sequence Errors Register
Definition: component_emac.h:67
WoReg EMAC_IER
(Emac Offset: 0x28) Interrupt Enable Register
Definition: component_emac.h:57
RwReg EMAC_RSR
(Emac Offset: 0x20) Receive Status Register
Definition: component_emac.h:55
RwReg EMAC_NCFGR
(Emac Offset: 0x04) Network Configuration Register
Definition: component_emac.h:49
RwReg EMAC_MCF
(Emac Offset: 0x48) Multiple Collision Frames Register
Definition: component_emac.h:65
RwReg EMAC_RSE
(Emac Offset: 0x74) Receive Symbol Errors Register
Definition: component_emac.h:76
RwReg EMAC_ECOL
(Emac Offset: 0x60) Excessive Collisions Register
Definition: component_emac.h:71