libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Defined Constants and Types for the Ethernet MAC for STM32Fxx7 chips More...
Enumerations | |
enum | eth_clk { ETH_CLK_025_035MHZ = ETH_MACMIIAR_CR_HCLK_DIV_16 , ETH_CLK_035_060MHZ = ETH_MACMIIAR_CR_HCLK_DIV_26 , ETH_CLK_060_100MHZ = ETH_MACMIIAR_CR_HCLK_DIV_42 , ETH_CLK_100_150MHZ = ETH_MACMIIAR_CR_HCLK_DIV_62 , ETH_CLK_150_168MHZ = ETH_MACMIIAR_CR_HCLK_DIV_102 } |
Functions | |
void | eth_smi_write (uint8_t phy, uint8_t reg, uint16_t data) |
Write 16-bit register to the PHY. More... | |
uint16_t | eth_smi_read (uint8_t phy, uint8_t reg) |
Read the 16-bit register from the PHY. More... | |
void | eth_smi_bit_op (uint8_t phy, uint8_t reg, uint16_t bits, uint16_t mask) |
Process the bit-operation on PHY register. More... | |
void | eth_smi_bit_clear (uint8_t phy, uint8_t reg, uint16_t clearbits) |
Clear bits in the register. More... | |
void | eth_smi_bit_set (uint8_t phy, uint8_t reg, uint16_t setbits) |
Set bits in the register. More... | |
void | eth_set_mac (const uint8_t *mac) |
Set MAC to the PHY. More... | |
void | eth_desc_init (uint8_t *buf, uint32_t nTx, uint32_t nRx, uint32_t cTx, uint32_t cRx, bool isext) |
Initialize buffers and descriptors. More... | |
bool | eth_tx (uint8_t *ppkt, uint32_t n) |
Transmit packet. More... | |
bool | eth_rx (uint8_t *ppkt, uint32_t *len, uint32_t maxlen) |
Receive packet. More... | |
void | eth_init (uint8_t phy, enum eth_clk clock) |
Initialize ethernet. More... | |
void | eth_start (void) |
Start the Ethernet DMA processing. More... | |
void | eth_enable_checksum_offload (void) |
Enable checksum offload feature. More... | |
void | eth_irq_enable (uint32_t reason) |
Enable the Ethernet IRQ. More... | |
void | eth_irq_disable (uint32_t reason) |
Disable the Ethernet IRQ. More... | |
bool | eth_irq_is_pending (uint32_t reason) |
Check if IRQ is pending. More... | |
bool | eth_irq_ack_pending (uint32_t reason) |
Check if IRQ is pending, and acknowledge it. More... | |
Defined Constants and Types for the Ethernet MAC for STM32Fxx7 chips
LGPL License Terms libopencm3 License
#define ETH_DES | ( | n, | |
base | |||
) | MMIO32((base) + (n)*4) |
Definition at line 113 of file mac_stm32fxx7.h.
#define ETH_DES0 | ( | base | ) | ETH_DES(0, base) |
Definition at line 114 of file mac_stm32fxx7.h.
#define ETH_DES1 | ( | base | ) | ETH_DES(1, base) |
Definition at line 115 of file mac_stm32fxx7.h.
#define ETH_DES2 | ( | base | ) | ETH_DES(2, base) |
Definition at line 116 of file mac_stm32fxx7.h.
#define ETH_DES3 | ( | base | ) | ETH_DES(3, base) |
Definition at line 117 of file mac_stm32fxx7.h.
#define ETH_DES4 | ( | base | ) | ETH_DES(4, base) |
Definition at line 120 of file mac_stm32fxx7.h.
#define ETH_DES5 | ( | base | ) | ETH_DES(5, base) |
Definition at line 121 of file mac_stm32fxx7.h.
#define ETH_DES6 | ( | base | ) | ETH_DES(6, base) |
Definition at line 122 of file mac_stm32fxx7.h.
#define ETH_DES7 | ( | base | ) | ETH_DES(7, base) |
Definition at line 123 of file mac_stm32fxx7.h.
#define ETH_DES_EXT_SIZE 32 |
Definition at line 594 of file mac_stm32fxx7.h.
#define ETH_DES_STD_SIZE 16 |
Definition at line 593 of file mac_stm32fxx7.h.
#define ETH_DMABMR MMIO32(ETHERNET_BASE + 0x1000) |
Definition at line 97 of file mac_stm32fxx7.h.
#define ETH_DMABMR_AAB (1<<25) |
Definition at line 473 of file mac_stm32fxx7.h.
#define ETH_DMABMR_DA (1<<1) |
Definition at line 449 of file mac_stm32fxx7.h.
#define ETH_DMABMR_DSL (0x1F << ETH_DMABR_DSL_SHIFT) |
Definition at line 452 of file mac_stm32fxx7.h.
#define ETH_DMABMR_DSL_SHIFT 2 |
Definition at line 451 of file mac_stm32fxx7.h.
#define ETH_DMABMR_EDFE (1<<7) |
Definition at line 454 of file mac_stm32fxx7.h.
#define ETH_DMABMR_FB (1<<16) |
Definition at line 466 of file mac_stm32fxx7.h.
#define ETH_DMABMR_FPM (1<<24) |
Definition at line 472 of file mac_stm32fxx7.h.
#define ETH_DMABMR_MB (1<<26) /* Not on STM32F1 */ |
Definition at line 474 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PBL (0x3F << ETH_DMABR_PBL_SHIFT) |
Definition at line 457 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PBL_SHIFT 8 |
Definition at line 456 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PM (0x03 << ETH_DMABMR_PM_SHIFT) |
Definition at line 460 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PM_1_1 (0 << ETH_DMABMR_PM_SHIFT) |
Definition at line 461 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PM_2_1 (1 << ETH_DMABMR_PM_SHIFT) |
Definition at line 462 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PM_3_1 (2 << ETH_DMABMR_PM_SHIFT) |
Definition at line 463 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PM_4_1 (3 << ETH_DMABMR_PM_SHIFT) |
Definition at line 464 of file mac_stm32fxx7.h.
#define ETH_DMABMR_PM_SHIFT 14 |
Definition at line 459 of file mac_stm32fxx7.h.
#define ETH_DMABMR_RDP (0x3F << ETH_DMABMR_RDP_SHIFT) |
Definition at line 469 of file mac_stm32fxx7.h.
#define ETH_DMABMR_RDP_SHIFT 17 |
Definition at line 468 of file mac_stm32fxx7.h.
#define ETH_DMABMR_SR (1<<0) |
Definition at line 448 of file mac_stm32fxx7.h.
#define ETH_DMABMR_USP (1<<23) |
Definition at line 471 of file mac_stm32fxx7.h.
#define ETH_DMACHRBAR MMIO32(ETHERNET_BASE + 0x1054) |
Definition at line 110 of file mac_stm32fxx7.h.
#define ETH_DMACHRDR MMIO32(ETHERNET_BASE + 0x104C) |
Definition at line 108 of file mac_stm32fxx7.h.
#define ETH_DMACHTBAR MMIO32(ETHERNET_BASE + 0x1050) |
Definition at line 109 of file mac_stm32fxx7.h.
#define ETH_DMACHTDR MMIO32(ETHERNET_BASE + 0x1048) |
Definition at line 107 of file mac_stm32fxx7.h.
#define ETH_DMAIER MMIO32(ETHERNET_BASE + 0x101C) |
Definition at line 104 of file mac_stm32fxx7.h.
#define ETH_DMAIER_AISE (1<<15) |
Definition at line 570 of file mac_stm32fxx7.h.
#define ETH_DMAIER_ERIE (1<<14) |
Definition at line 569 of file mac_stm32fxx7.h.
#define ETH_DMAIER_ETIE (1<<10) |
Definition at line 567 of file mac_stm32fxx7.h.
#define ETH_DMAIER_FBEIE (1<<13) |
Definition at line 568 of file mac_stm32fxx7.h.
#define ETH_DMAIER_NISE (1<<16) |
Definition at line 571 of file mac_stm32fxx7.h.
#define ETH_DMAIER_RBUIE (1<<7) |
Definition at line 564 of file mac_stm32fxx7.h.
#define ETH_DMAIER_RIE (1<<6) |
Definition at line 563 of file mac_stm32fxx7.h.
#define ETH_DMAIER_ROIE (1<<4) |
Definition at line 561 of file mac_stm32fxx7.h.
#define ETH_DMAIER_RPSIE (1<<8) |
Definition at line 565 of file mac_stm32fxx7.h.
#define ETH_DMAIER_RWTIE (1<<9) |
Definition at line 566 of file mac_stm32fxx7.h.
#define ETH_DMAIER_TBUIE (1<<2) |
Definition at line 559 of file mac_stm32fxx7.h.
#define ETH_DMAIER_TIE (1<<0) |
Definition at line 557 of file mac_stm32fxx7.h.
#define ETH_DMAIER_TJTIE (1<<3) |
Definition at line 560 of file mac_stm32fxx7.h.
#define ETH_DMAIER_TPSIE (1<<1) |
Definition at line 558 of file mac_stm32fxx7.h.
#define ETH_DMAIER_TUIE (1<<5) |
Definition at line 562 of file mac_stm32fxx7.h.
#define ETH_DMAMFBOCR MMIO32(ETHERNET_BASE + 0x1020) |
Definition at line 105 of file mac_stm32fxx7.h.
#define ETH_DMAMFBOCR_MFA (0x7FF << ETH_DMAMFBOCR_MFA_SHIFT) |
Definition at line 579 of file mac_stm32fxx7.h.
#define ETH_DMAMFBOCR_MFC (0xFFFF << ETH_DMAMFBOCR_MFC_SHIFT) |
Definition at line 577 of file mac_stm32fxx7.h.
#define ETH_DMAMFBOCR_MFC_SHIFT 0 |
Definition at line 576 of file mac_stm32fxx7.h.
#define ETH_DMAMFBOCR_OFOC (1<<28) |
Definition at line 580 of file mac_stm32fxx7.h.
#define ETH_DMAMFBOCR_OMFC (1<<16) |
Definition at line 578 of file mac_stm32fxx7.h.
#define ETH_DMAOMR MMIO32(ETHERNET_BASE + 0x1018) |
Definition at line 103 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_DFRF (1<<24) |
Definition at line 550 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_DTCEFD (1<<26) |
Definition at line 552 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_FEF (1<<7) |
Definition at line 534 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_FTF (1<<20) |
Definition at line 548 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_FUGF (1<<6) |
Definition at line 533 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_OSF (1<<2) |
Definition at line 524 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_RSF (1<<25) |
Definition at line 551 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_RTC (3 << ETH_DMAOMR_RTC_SHIFT) |
Definition at line 527 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_RTC_128 (3 << ETH_DMAOMR_RTC_SHIFT) |
Definition at line 531 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_RTC_32 (1 << ETH_DMAOMR_RTC_SHIFT) |
Definition at line 529 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_RTC_64 (0 << ETH_DMAOMR_RTC_SHIFT) |
Definition at line 528 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_RTC_96 (2 << ETH_DMAOMR_RTC_SHIFT) |
Definition at line 530 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_RTC_SHIFT 3 |
Definition at line 526 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_SR (1<<1) |
Definition at line 523 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_ST (1<<13) |
Definition at line 535 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TSF (1<<21) |
Definition at line 549 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC (0x07 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 538 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_128 (1 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 540 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_16 (7 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 546 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_192 (2 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 541 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_24 (6 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 545 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_256 (3 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 542 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_32 (5 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 544 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_40 (4 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 543 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_64 (0 << ETH_DMAOMR_TTC_SHIFT) |
Definition at line 539 of file mac_stm32fxx7.h.
#define ETH_DMAOMR_TTC_SHIFT 14 |
Definition at line 537 of file mac_stm32fxx7.h.
#define ETH_DMARDLAR MMIO32(ETHERNET_BASE + 0x100C) |
Definition at line 100 of file mac_stm32fxx7.h.
#define ETH_DMARPDR MMIO32(ETHERNET_BASE + 0x1008) |
Definition at line 99 of file mac_stm32fxx7.h.
#define ETH_DMARSWTR MMIO32(ETHERNET_BASE + 0x1024) /* Not on STM32F1 */ |
Definition at line 106 of file mac_stm32fxx7.h.
#define ETH_DMARSWTR_RSWTC 0xFF |
Definition at line 586 of file mac_stm32fxx7.h.
#define ETH_DMASR MMIO32(ETHERNET_BASE + 0x1014) |
Definition at line 102 of file mac_stm32fxx7.h.
#define ETH_DMASR_AIS (1<<15) |
Definition at line 492 of file mac_stm32fxx7.h.
#define ETH_DMASR_EBS (7<<ETH_DMASR_EBS_SHIFT) |
Definition at line 514 of file mac_stm32fxx7.h.
#define ETH_DMASR_EBS_SHIFT 23 |
Definition at line 513 of file mac_stm32fxx7.h.
#define ETH_DMASR_ERS (1<<14) |
Definition at line 491 of file mac_stm32fxx7.h.
#define ETH_DMASR_ETS (1<<10) |
Definition at line 489 of file mac_stm32fxx7.h.
#define ETH_DMASR_FBES (1<<13) |
Definition at line 490 of file mac_stm32fxx7.h.
#define ETH_DMASR_MMCS (1<<27) |
Definition at line 516 of file mac_stm32fxx7.h.
#define ETH_DMASR_NIS (1<<16) |
Definition at line 493 of file mac_stm32fxx7.h.
#define ETH_DMASR_PMTS (1<<28) |
Definition at line 517 of file mac_stm32fxx7.h.
#define ETH_DMASR_RBUS (1<<7) |
Definition at line 486 of file mac_stm32fxx7.h.
#define ETH_DMASR_ROS (1<<4) |
Definition at line 483 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS (7<<ETH_DMASR_RPS_SHIFT) |
Definition at line 496 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS_CLOSE (5<<ETH_DMASR_RPS_SHIFT) |
Definition at line 501 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS_FETCH (1<<ETH_DMASR_RPS_SHIFT) |
Definition at line 498 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS_SHIFT 17 |
Definition at line 495 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS_STOP (0<<ETH_DMASR_RPS_SHIFT) |
Definition at line 497 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS_SUSPEND (4<<ETH_DMASR_RPS_SHIFT) |
Definition at line 500 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS_TRANSFER (7<<ETH_DMASR_RPS_SHIFT) |
Definition at line 502 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPS_WAIT (3<<ETH_DMASR_RPS_SHIFT) |
Definition at line 499 of file mac_stm32fxx7.h.
#define ETH_DMASR_RPSS (1<<8) |
Definition at line 487 of file mac_stm32fxx7.h.
#define ETH_DMASR_RS (1<<6) |
Definition at line 485 of file mac_stm32fxx7.h.
#define ETH_DMASR_RWTS (1<<9) |
Definition at line 488 of file mac_stm32fxx7.h.
#define ETH_DMASR_TBUS (1<<2) |
Definition at line 481 of file mac_stm32fxx7.h.
#define ETH_DMASR_TJTS (1<<3) |
Definition at line 482 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS (7<<ETH_DMASR_TPS_SHIFT) |
Definition at line 505 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS_CLOSE (7<<ETH_DMASR_TPS_SHIFT) |
Definition at line 511 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS_FETCH (1<<ETH_DMASR_TPS_SHIFT) |
Definition at line 507 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS_SHIFT 20 |
Definition at line 504 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS_STOP (0<<ETH_DMASR_TPS_SHIFT) |
Definition at line 506 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS_SUSPEND (6<<ETH_DMASR_TPS_SHIFT) |
Definition at line 510 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS_TRANSFER (3<<ETH_DMASR_TPS_SHIFT) |
Definition at line 509 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPS_WAIT (2<<ETH_DMASR_TPS_SHIFT) |
Definition at line 508 of file mac_stm32fxx7.h.
#define ETH_DMASR_TPSS (1<<1) |
Definition at line 480 of file mac_stm32fxx7.h.
#define ETH_DMASR_TS (1<<0) |
Definition at line 479 of file mac_stm32fxx7.h.
#define ETH_DMASR_TSTS (1<<29) |
Definition at line 518 of file mac_stm32fxx7.h.
#define ETH_DMASR_TUS (1<<5) |
Definition at line 484 of file mac_stm32fxx7.h.
#define ETH_DMATDLAR MMIO32(ETHERNET_BASE + 0x1010) |
Definition at line 101 of file mac_stm32fxx7.h.
#define ETH_DMATPDR MMIO32(ETHERNET_BASE + 0x1004) |
Definition at line 98 of file mac_stm32fxx7.h.
#define ETH_MACA0HR_MACA0H (0xFFFF<<0) |
Definition at line 311 of file mac_stm32fxx7.h.
#define ETH_MACA0HR_MO (1<<31) |
Definition at line 312 of file mac_stm32fxx7.h.
#define ETH_MACAHR | ( | i | ) | MMIO32(ETHERNET_BASE + 0x40+(i)*8) |
Definition at line 66 of file mac_stm32fxx7.h.
#define ETH_MACAHR_AE (1<<31) |
Definition at line 326 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MACAH (0xFFFF<<0) |
Definition at line 317 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MBC_0 (1<<24) |
Definition at line 319 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MBC_1 (1<<25) |
Definition at line 320 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MBC_2 (1<<26) |
Definition at line 321 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MBC_3 (1<<27) |
Definition at line 322 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MBC_4 (1<<28) |
Definition at line 323 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MBC_5 (1<<29) |
Definition at line 324 of file mac_stm32fxx7.h.
#define ETH_MACAHR_MBC_ALL (63<<24) |
Definition at line 318 of file mac_stm32fxx7.h.
#define ETH_MACAHR_SA (1<<30) |
Definition at line 325 of file mac_stm32fxx7.h.
#define ETH_MACALR | ( | i | ) | MMIO32(ETHERNET_BASE + 0x44+(i)*8) |
Definition at line 68 of file mac_stm32fxx7.h.
#define ETH_MACCR MMIO32(ETHERNET_BASE + 0x00) |
Definition at line 51 of file mac_stm32fxx7.h.
#define ETH_MACCR_APCS (1<<7) |
Definition at line 143 of file mac_stm32fxx7.h.
#define ETH_MACCR_BL (3 << ETH_MACCR_BL_SHIFT) |
Definition at line 137 of file mac_stm32fxx7.h.
#define ETH_MACCR_BL_MIN1 (3 << ETH_MACCR_BL_SHIFT) |
Definition at line 141 of file mac_stm32fxx7.h.
#define ETH_MACCR_BL_MIN10 (0 << ETH_MACCR_BL_SHIFT) |
Definition at line 138 of file mac_stm32fxx7.h.
#define ETH_MACCR_BL_MIN4 (2 << ETH_MACCR_BL_SHIFT) |
Definition at line 140 of file mac_stm32fxx7.h.
#define ETH_MACCR_BL_MIN8 (1 << ETH_MACCR_BL_SHIFT) |
Definition at line 139 of file mac_stm32fxx7.h.
#define ETH_MACCR_BL_SHIFT 5 |
Definition at line 136 of file mac_stm32fxx7.h.
#define ETH_MACCR_CSD (1<<16) |
Definition at line 150 of file mac_stm32fxx7.h.
#define ETH_MACCR_CSTF (1<<25) /* Not on STM32F1 */ |
Definition at line 157 of file mac_stm32fxx7.h.
#define ETH_MACCR_DC (1<<4) |
Definition at line 134 of file mac_stm32fxx7.h.
#define ETH_MACCR_DM (1<<11) |
Definition at line 146 of file mac_stm32fxx7.h.
#define ETH_MACCR_FES (1<<14) |
Definition at line 149 of file mac_stm32fxx7.h.
#define ETH_MACCR_IFG (7<<ETH_MACCR_IFG_SHIFT) |
Definition at line 153 of file mac_stm32fxx7.h.
#define ETH_MACCR_IFG_SHIFT 17 |
Definition at line 152 of file mac_stm32fxx7.h.
#define ETH_MACCR_IPCO (1<<10) |
Definition at line 145 of file mac_stm32fxx7.h.
#define ETH_MACCR_JD (1<<22) |
Definition at line 155 of file mac_stm32fxx7.h.
#define ETH_MACCR_LM (1<<12) |
Definition at line 147 of file mac_stm32fxx7.h.
#define ETH_MACCR_RD (1<<9) |
Definition at line 144 of file mac_stm32fxx7.h.
#define ETH_MACCR_RE (1<<2) |
Definition at line 132 of file mac_stm32fxx7.h.
#define ETH_MACCR_ROD (1<<13) |
Definition at line 148 of file mac_stm32fxx7.h.
#define ETH_MACCR_TE (1<<3) |
Definition at line 133 of file mac_stm32fxx7.h.
#define ETH_MACCR_WD (1<<23) |
Definition at line 156 of file mac_stm32fxx7.h.
#define ETH_MACDBGR MMIO32(ETHERNET_BASE + 0x34) /* Not on STM32F1 */ |
Definition at line 61 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MMRPEA (1<<0) |
Definition at line 251 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MMTEA (1<<16) |
Definition at line 269 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MSFRWCS (3<<1) |
Definition at line 252 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MTFCS (3 << ETH_MACDBGR_MTFCS_SHIFT) |
Definition at line 272 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MTFCS_IDLE (0 << ETH_MACDBGR_MTFCS_SHIFT) |
Definition at line 273 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MTFCS_PAUSE (2 << ETH_MACDBGR_MTFCS_SHIFT) |
Definition at line 275 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MTFCS_SHIFT 17 |
Definition at line 271 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MTFCS_TRANSFER (3 << ETH_MACDBGR_MTFCS_SHIFT) |
Definition at line 276 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MTFCS_WAIT (1 << ETH_MACDBGR_MTFCS_SHIFT) |
Definition at line 274 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_MTP (1<<19) |
Definition at line 278 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFFL (3<<ETH_MACDBGR_RFFL_SHIFT) |
Definition at line 263 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFFL_ABOVE (2<<ETH_MACDBGR_RFFL_SHIFT) |
Definition at line 266 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFFL_BELOW (1<<ETH_MACDBGR_RFFL_SHIFT) |
Definition at line 265 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFFL_EMPTY (0<<ETH_MACDBGR_RFFL_SHIFT) |
Definition at line 264 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFFL_FULL (3<<ETH_MACDBGR_RFFL_SHIFT) |
Definition at line 267 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFFL_SHIFT 8 |
Definition at line 262 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFRCS (3<<ETH_MACDBGR_RFRCS_SHIFT) |
Definition at line 256 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFRCS_FLUSH (3<<ETH_MACDBGR_RFRCS_SHIFT) |
Definition at line 260 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFRCS_IDLE (0<<ETH_MACDBGR_RFRCS_SHIFT) |
Definition at line 257 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFRCS_RDATA (1<<ETH_MACDBGR_RFRCS_SHIFT) |
Definition at line 258 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFRCS_RSTAT (2<<ETH_MACDBGR_RFRCS_SHIFT) |
Definition at line 259 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFRCS_SHIFT 5 |
Definition at line 255 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_RFWRA (1<<4) |
Definition at line 253 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFF (1<<25) |
Definition at line 289 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFNE (1<<24) |
Definition at line 288 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFRS (3<<ETH_MACDBGR_TFRS_SHIFT) |
Definition at line 281 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFRS_FLUSH (3<<ETH_MACDBGR_TFRS_SHIFT) |
Definition at line 285 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFRS_IDLE (0<<ETH_MACDBGR_TFRS_SHIFT) |
Definition at line 282 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFRS_READ (1<<ETH_MACDBGR_TFRS_SHIFT) |
Definition at line 283 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFRS_SHIFT 20 |
Definition at line 280 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFRS_WAIT (2<<ETH_MACDBGR_TFRS_SHIFT) |
Definition at line 284 of file mac_stm32fxx7.h.
#define ETH_MACDBGR_TFWA (1<<22) |
Definition at line 287 of file mac_stm32fxx7.h.
#define ETH_MACFCR MMIO32(ETHERNET_BASE + 0x18) |
Definition at line 57 of file mac_stm32fxx7.h.
#define ETH_MACFCR_BPA (1<<0) |
Definition at line 213 of file mac_stm32fxx7.h.
#define ETH_MACFCR_FCB (1<<0) |
Definition at line 212 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PLT (0x03 << ETH_MACFCR_PLT_SHIFT) |
Definition at line 219 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PLT_144 (2 << ETH_MACFCR_PLT_SHIFT) |
Definition at line 222 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PLT_256 (3 << ETH_MACFCR_PLT_SHIFT) |
Definition at line 223 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PLT_28 (1 << ETH_MACFCR_PLT_SHIFT) |
Definition at line 221 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PLT_4 (0 << ETH_MACFCR_PLT_SHIFT) |
Definition at line 220 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PLT_SHIFT 4 |
Definition at line 218 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PT (0xFFFF << ETH_MACFCR_PT) |
Definition at line 228 of file mac_stm32fxx7.h.
#define ETH_MACFCR_PT_SHIFT 16 |
Definition at line 227 of file mac_stm32fxx7.h.
#define ETH_MACFCR_RFCE (1<<2) |
Definition at line 215 of file mac_stm32fxx7.h.
#define ETH_MACFCR_TFCE (1<<1) |
Definition at line 214 of file mac_stm32fxx7.h.
#define ETH_MACFCR_UPFD (1<<3) |
Definition at line 216 of file mac_stm32fxx7.h.
#define ETH_MACFCR_ZQPD (1<<7) |
Definition at line 225 of file mac_stm32fxx7.h.
#define ETH_MACFFR MMIO32(ETHERNET_BASE + 0x04) |
Definition at line 52 of file mac_stm32fxx7.h.
#define ETH_MACFFR_BFD (1<<5) |
Definition at line 166 of file mac_stm32fxx7.h.
#define ETH_MACFFR_DAIF (1<<3) |
Definition at line 164 of file mac_stm32fxx7.h.
#define ETH_MACFFR_HM (1<<2) |
Definition at line 163 of file mac_stm32fxx7.h.
#define ETH_MACFFR_HPF (1<<10) |
Definition at line 177 of file mac_stm32fxx7.h.
#define ETH_MACFFR_HU (1<<1) |
Definition at line 162 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PAM (1<<4) |
Definition at line 165 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PCF (3<<ETH_MACFFR_PCF_SHIFT) |
Definition at line 169 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PCF_ALL (2<<ETH_MACFFR_PCF_SHIFT) |
Definition at line 172 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PCF_DISABLE (0<<ETH_MACFFR_PCF_SHIFT) |
Definition at line 170 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PCF_NOPAUSE (1<<ETH_MACFFR_PCF_SHIFT) |
Definition at line 171 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PCF_PASS (3<<ETH_MACFFR_PCF_SHIFT) |
Definition at line 173 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PCF_SHIFT 6 |
Definition at line 168 of file mac_stm32fxx7.h.
#define ETH_MACFFR_PM (1<<0) |
Definition at line 161 of file mac_stm32fxx7.h.
#define ETH_MACFFR_RA (1<<31) |
Definition at line 178 of file mac_stm32fxx7.h.
#define ETH_MACFFR_SAF (1<<9) |
Definition at line 176 of file mac_stm32fxx7.h.
#define ETH_MACFFR_SAIF (1<<8) |
Definition at line 175 of file mac_stm32fxx7.h.
#define ETH_MACHTHR MMIO32(ETHERNET_BASE + 0x08) |
Definition at line 53 of file mac_stm32fxx7.h.
#define ETH_MACHTLR MMIO32(ETHERNET_BASE + 0x0C) |
Definition at line 54 of file mac_stm32fxx7.h.
#define ETH_MACIMR MMIO32(ETHERNET_BASE + 0x3C) |
Definition at line 63 of file mac_stm32fxx7.h.
#define ETH_MACIMR_PMTIM (1<<3) |
Definition at line 305 of file mac_stm32fxx7.h.
#define ETH_MACIMR_TSTIM (1<<9) |
Definition at line 306 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR MMIO32(ETHERNET_BASE + 0x10) |
Definition at line 55 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_CR (7<<ETH_MACMIIAR_CR_SHIFT) |
Definition at line 187 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_CR_HCLK_DIV_102 (4<<ETH_MACMIIAR_CR_SHIFT) |
Definition at line 197 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_CR_HCLK_DIV_16 (2<<ETH_MACMIIAR_CR_SHIFT) |
Definition at line 193 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_CR_HCLK_DIV_26 (3<<ETH_MACMIIAR_CR_SHIFT) |
Definition at line 195 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_CR_HCLK_DIV_42 (0<<ETH_MACMIIAR_CR_SHIFT) |
Definition at line 189 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_CR_HCLK_DIV_62 (1<<ETH_MACMIIAR_CR_SHIFT) |
Definition at line 191 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_CR_SHIFT 2 |
Definition at line 186 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_MB (1<<0) |
Definition at line 183 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_MR (0x1F << ETH_MACMIIAR_MR_SHIFT) |
Definition at line 200 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_MR_SHIFT 6 |
Definition at line 199 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_MW (1<<1) |
Definition at line 184 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_PA (0x1F << ETH_MACMIIAR_MR_SHIFT) |
Definition at line 203 of file mac_stm32fxx7.h.
#define ETH_MACMIIAR_PA_SHIFT 11 |
Definition at line 202 of file mac_stm32fxx7.h.
#define ETH_MACMIIDR MMIO32(ETHERNET_BASE + 0x14) |
Definition at line 56 of file mac_stm32fxx7.h.
#define ETH_MACMIIDR_MD 0xFFFF |
Definition at line 208 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR MMIO32(ETHERNET_BASE + 0x2C) |
Definition at line 60 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR_GU (1<<9) |
Definition at line 244 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR_MPE (1<<1) |
Definition at line 240 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR_MPR (1<<5) |
Definition at line 242 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR_PD (1<<0) |
Definition at line 239 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR_WFE (1<<2) |
Definition at line 241 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR_WFFRPR (1<<31) |
Definition at line 245 of file mac_stm32fxx7.h.
#define ETH_MACPMTCSR_WFR (1<<6) |
Definition at line 243 of file mac_stm32fxx7.h.
#define ETH_MACRWUFFR MMIO32(ETHERNET_BASE + 0x28) |
Definition at line 59 of file mac_stm32fxx7.h.
#define ETH_MACSR MMIO32(ETHERNET_BASE + 0x38) |
Definition at line 62 of file mac_stm32fxx7.h.
#define ETH_MACSR_MMCRS (1<<5) |
Definition at line 297 of file mac_stm32fxx7.h.
#define ETH_MACSR_MMCS (1<<4) |
Definition at line 296 of file mac_stm32fxx7.h.
#define ETH_MACSR_MMCTS (1<<6) |
Definition at line 298 of file mac_stm32fxx7.h.
#define ETH_MACSR_PMTS (1<<3) |
Definition at line 295 of file mac_stm32fxx7.h.
#define ETH_MACSR_TSTS (1<<9) |
Definition at line 299 of file mac_stm32fxx7.h.
#define ETH_MACVLANTR MMIO32(ETHERNET_BASE + 0x1C) |
Definition at line 58 of file mac_stm32fxx7.h.
#define ETH_MACVLANTR_VLANTC (1<<16) |
Definition at line 234 of file mac_stm32fxx7.h.
#define ETH_MACVLANTR_VLANTI (0xFFFF << ETH_MACVLANTR_VLANTI_SHIFT) |
Definition at line 233 of file mac_stm32fxx7.h.
#define ETH_MACVLANTR_VLANTI_SHIFT 0 |
Definition at line 232 of file mac_stm32fxx7.h.
#define ETH_MMCCR MMIO32(ETHERNET_BASE + 0x100) |
Definition at line 71 of file mac_stm32fxx7.h.
#define ETH_MMCCR_CR (1<<0) |
Definition at line 331 of file mac_stm32fxx7.h.
#define ETH_MMCCR_CSR (1<<1) |
Definition at line 332 of file mac_stm32fxx7.h.
#define ETH_MMCCR_MCF (1<<3) |
Definition at line 334 of file mac_stm32fxx7.h.
#define ETH_MMCCR_MCFHP (1<<5) /* Not on STM32F1 */ |
Definition at line 336 of file mac_stm32fxx7.h.
#define ETH_MMCCR_MCP (1<<4) /* Not on STM32F1 */ |
Definition at line 335 of file mac_stm32fxx7.h.
#define ETH_MMCCR_ROR (1<<2) |
Definition at line 333 of file mac_stm32fxx7.h.
#define ETH_MMCRFAECR MMIO32(ETHERNET_BASE + 0x198) |
Definition at line 80 of file mac_stm32fxx7.h.
#define ETH_MMCRFCECR MMIO32(ETHERNET_BASE + 0x194) |
Definition at line 79 of file mac_stm32fxx7.h.
#define ETH_MMCRGUFCR MMIO32(ETHERNET_BASE + 0x1C4) |
Definition at line 81 of file mac_stm32fxx7.h.
#define ETH_MMCRIMR MMIO32(ETHERNET_BASE + 0x10C) |
Definition at line 74 of file mac_stm32fxx7.h.
#define ETH_MMCRIMR_RFAEM (1<<6) |
Definition at line 357 of file mac_stm32fxx7.h.
#define ETH_MMCRIMR_RFCEM (1<<5) |
Definition at line 356 of file mac_stm32fxx7.h.
#define ETH_MMCRIMR_RGUFM (1<<17) |
Definition at line 358 of file mac_stm32fxx7.h.
#define ETH_MMCRIR MMIO32(ETHERNET_BASE + 0x104) |
Definition at line 72 of file mac_stm32fxx7.h.
#define ETH_MMCRIR_RFAES (1<<6) |
Definition at line 343 of file mac_stm32fxx7.h.
#define ETH_MMCRIR_RFCES (1<<5) |
Definition at line 342 of file mac_stm32fxx7.h.
#define ETH_MMCRIR_RGUFS (1<<17) |
Definition at line 344 of file mac_stm32fxx7.h.
#define ETH_MMCTGFCR MMIO32(ETHERNET_BASE + 0x168) |
Definition at line 78 of file mac_stm32fxx7.h.
#define ETH_MMCTGFMSCCR MMIO32(ETHERNET_BASE + 0x150) |
Definition at line 77 of file mac_stm32fxx7.h.
#define ETH_MMCTGFSCCR MMIO32(ETHERNET_BASE + 0x14C) |
Definition at line 76 of file mac_stm32fxx7.h.
#define ETH_MMCTIMR MMIO32(ETHERNET_BASE + 0x110) |
Definition at line 75 of file mac_stm32fxx7.h.
#define ETH_MMCTIMR_TGFMSCS (1<<15) |
Definition at line 364 of file mac_stm32fxx7.h.
#define ETH_MMCTIMR_TGFS (1<<21) |
Definition at line 365 of file mac_stm32fxx7.h.
#define ETH_MMCTIMR_TGFSCS (1<<14) |
Definition at line 363 of file mac_stm32fxx7.h.
#define ETH_MMCTIR MMIO32(ETHERNET_BASE + 0x108) |
Definition at line 73 of file mac_stm32fxx7.h.
#define ETH_MMCTIR_TGFMSCS (1<<15) |
Definition at line 350 of file mac_stm32fxx7.h.
#define ETH_MMCTIR_TGFS (1<<21) |
Definition at line 351 of file mac_stm32fxx7.h.
#define ETH_MMCTIR_TGFSCS (1<<14) |
Definition at line 349 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR MMIO32(ETHERNET_BASE + 0x72C) /* Not on STM32F1 */ |
Definition at line 94 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_1024HZ (0x0A<<0) |
Definition at line 437 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_128HZ (0x07<<0) |
Definition at line 434 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_16384HZ (0x0E<<0) |
Definition at line 441 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_16HZ (0x04<<0) |
Definition at line 431 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_1HZ (0x00<<0) |
Definition at line 427 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_2048HZ (0x0B<<0) |
Definition at line 438 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_256HZ (0x08<<0) |
Definition at line 435 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_2HZ (0x01<<0) |
Definition at line 428 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_32768HZ (0x0F<<0) |
Definition at line 442 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_32HZ (0x05<<0) |
Definition at line 432 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_4096HZ (0x0C<<0) |
Definition at line 439 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_4HZ (0x02<<0) |
Definition at line 429 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_512HZ (0x09<<0) |
Definition at line 436 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_64HZ (0x06<<0) |
Definition at line 433 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_8192HZ (0x0D<<0) |
Definition at line 440 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_8HZ (0x03<<0) |
Definition at line 430 of file mac_stm32fxx7.h.
#define ETH_PTPPPSCR_PPSFREQ_MASK (0x0F<<0) |
Definition at line 426 of file mac_stm32fxx7.h.
#define ETH_PTPSSIR MMIO32(ETHERNET_BASE + 0x704) |
Definition at line 85 of file mac_stm32fxx7.h.
#define ETH_PTPSSIR_STSSI 0xFF |
Definition at line 400 of file mac_stm32fxx7.h.
#define ETH_PTPTSAR MMIO32(ETHERNET_BASE + 0x718) |
Definition at line 90 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR MMIO32(ETHERNET_BASE + 0x700) |
Definition at line 84 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSCNT (3 << ETH_PTPTSCR_TSCNT_SHIFT) |
Definition at line 388 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSCNT_BOUND (1 << ETH_PTPTSCR_TSCNT_SHIFT) |
Definition at line 390 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSCNT_ETETC (2 << ETH_PTPTSCR_TSCNT_SHIFT) |
Definition at line 391 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSCNT_ORD (0 << ETH_PTPTSCR_TSCNT_SHIFT) |
Definition at line 389 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSCNT_PTPTC (3 << ETH_PTPTSCR_TSCNT_SHIFT) |
Definition at line 392 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSCNT_SHIFT 16 |
Definition at line 387 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSE (1<<0) |
Definition at line 370 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSFCU (1<<1) |
Definition at line 371 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSITE (1<<4) |
Definition at line 374 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSPFFMAE (1<<18) |
Definition at line 394 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSPTPPSV2E (1<<10) |
Definition at line 380 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSARFE (1<<8) |
Definition at line 378 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSEME (1<<14) |
Definition at line 384 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSIPV4FE (1<<13) |
Definition at line 383 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSIPV6FE (1<<12) |
Definition at line 382 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSMRME (1<<15) |
Definition at line 385 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSPTPOEFE (1<<11) |
Definition at line 381 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSSR (1<<9) |
Definition at line 379 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSTI (1<<2) |
Definition at line 372 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TSSTU (1<<3) |
Definition at line 373 of file mac_stm32fxx7.h.
#define ETH_PTPTSCR_TTSARU (1<<5) |
Definition at line 375 of file mac_stm32fxx7.h.
#define ETH_PTPTSHR MMIO32(ETHERNET_BASE + 0x708) |
Definition at line 86 of file mac_stm32fxx7.h.
#define ETH_PTPTSHUR MMIO32(ETHERNET_BASE + 0x710) |
Definition at line 88 of file mac_stm32fxx7.h.
#define ETH_PTPTSLR MMIO32(ETHERNET_BASE + 0x70C) |
Definition at line 87 of file mac_stm32fxx7.h.
#define ETH_PTPTSLR_STPNS (1<<31) |
Definition at line 406 of file mac_stm32fxx7.h.
#define ETH_PTPTSLR_STSS 0x7FFFFFFF |
Definition at line 405 of file mac_stm32fxx7.h.
#define ETH_PTPTSLUR MMIO32(ETHERNET_BASE + 0x714) |
Definition at line 89 of file mac_stm32fxx7.h.
#define ETH_PTPTSLUR_TSUPNS (1<<31) |
Definition at line 412 of file mac_stm32fxx7.h.
#define ETH_PTPTSLUR_TSUSS 0x7FFFFFFF |
Definition at line 411 of file mac_stm32fxx7.h.
#define ETH_PTPTSSR MMIO32(ETHERNET_BASE + 0x728) /* Not on STM32F1 */ |
Definition at line 93 of file mac_stm32fxx7.h.
#define ETH_PTPTSSR_TSSO (1<<0) |
Definition at line 418 of file mac_stm32fxx7.h.
#define ETH_PTPTSSR_TSTTR (1<<1) |
Definition at line 419 of file mac_stm32fxx7.h.
#define ETH_PTPTTHR MMIO32(ETHERNET_BASE + 0x71C) |
Definition at line 91 of file mac_stm32fxx7.h.
#define ETH_PTPTTLR MMIO32(ETHERNET_BASE + 0x720) |
Definition at line 92 of file mac_stm32fxx7.h.
#define ETH_RDES0_AFM (1<<30) |
Definition at line 673 of file mac_stm32fxx7.h.
#define ETH_RDES0_CE (1<<1) |
Definition at line 653 of file mac_stm32fxx7.h.
#define ETH_RDES0_DCE (1<<14) |
Definition at line 667 of file mac_stm32fxx7.h.
#define ETH_RDES0_DE (1<<2) |
Definition at line 654 of file mac_stm32fxx7.h.
#define ETH_RDES0_ES (1<<15) |
Definition at line 668 of file mac_stm32fxx7.h.
#define ETH_RDES0_ESA (1<<0) |
Definition at line 652 of file mac_stm32fxx7.h.
#define ETH_RDES0_FL (0x3FFF<<ETH_RDES0_FL_SHIFT) |
Definition at line 671 of file mac_stm32fxx7.h.
#define ETH_RDES0_FL_SHIFT 16 |
Definition at line 670 of file mac_stm32fxx7.h.
#define ETH_RDES0_FS (1<<9) |
Definition at line 662 of file mac_stm32fxx7.h.
#define ETH_RDES0_FT (1<<5) |
Definition at line 657 of file mac_stm32fxx7.h.
#define ETH_RDES0_IPHCE (1<<7) |
Definition at line 659 of file mac_stm32fxx7.h.
#define ETH_RDES0_LCO (1<<6) |
Definition at line 658 of file mac_stm32fxx7.h.
#define ETH_RDES0_LE (1<<12) |
Definition at line 665 of file mac_stm32fxx7.h.
#define ETH_RDES0_LS (1<<8) |
Definition at line 661 of file mac_stm32fxx7.h.
#define ETH_RDES0_OE (1<<11) |
Definition at line 664 of file mac_stm32fxx7.h.
#define ETH_RDES0_OWN (1<<31) |
Definition at line 674 of file mac_stm32fxx7.h.
#define ETH_RDES0_PCE (1<<0) |
Definition at line 651 of file mac_stm32fxx7.h.
#define ETH_RDES0_RE (1<<3) |
Definition at line 655 of file mac_stm32fxx7.h.
#define ETH_RDES0_RWT (1<<4) |
Definition at line 656 of file mac_stm32fxx7.h.
#define ETH_RDES0_SAF (1<<13) |
Definition at line 666 of file mac_stm32fxx7.h.
#define ETH_RDES0_TSV (1<<7) |
Definition at line 660 of file mac_stm32fxx7.h.
#define ETH_RDES0_VLAN (1<<10) |
Definition at line 663 of file mac_stm32fxx7.h.
#define ETH_RDES1_DIC (1<<31) |
Definition at line 688 of file mac_stm32fxx7.h.
#define ETH_RDES1_RBS1 (0x1FFF<<ETH_RDES1_RBS1_SHIFT) |
Definition at line 680 of file mac_stm32fxx7.h.
#define ETH_RDES1_RBS1_SHIFT 0 |
Definition at line 679 of file mac_stm32fxx7.h.
#define ETH_RDES1_RBS2 (0x1FFF<<ETH_RDES1_RBS2_SHIFT) |
Definition at line 686 of file mac_stm32fxx7.h.
#define ETH_RDES1_RBS2_SHIFT 16 |
Definition at line 685 of file mac_stm32fxx7.h.
#define ETH_RDES1_RCH (1<<14) |
Definition at line 682 of file mac_stm32fxx7.h.
#define ETH_RDES1_RER (1<<15) |
Definition at line 683 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPCB (1<<5) |
Definition at line 702 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPHE (1<<3) |
Definition at line 700 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPPE (1<<4) |
Definition at line 701 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPPT (7<<ETH_RDES4_IPPT_SHIFT) |
Definition at line 694 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPPT_ICMP (3<<ETH_RDES4_IPPT_SHIFT) |
Definition at line 698 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPPT_SHIFT 0 |
Definition at line 693 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPPT_TCP (2<<ETH_RDES4_IPPT_SHIFT) |
Definition at line 697 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPPT_UDP (1<<ETH_RDES4_IPPT_SHIFT) |
Definition at line 696 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPPT_UNKNOWN (0<<ETH_RDES4_IPPT_SHIFT) |
Definition at line 695 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPV4PR (1<<6) |
Definition at line 703 of file mac_stm32fxx7.h.
#define ETH_RDES4_IPV6PR (1<<7) |
Definition at line 704 of file mac_stm32fxx7.h.
#define ETH_RDES4_PFT (1<<12) |
Definition at line 717 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT (0x0F<<ETH_RDES4_PMT_SHIFT) |
Definition at line 707 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_DLYRQ (0x03<<ETH_RDES4_PMT_SHIFT) |
Definition at line 711 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_DLYRSP (0x04<<ETH_RDES4_PMT_SHIFT) |
Definition at line 712 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_FOLLOW (0x02<<ETH_RDES4_PMT_SHIFT) |
Definition at line 710 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_NO (0x00<<ETH_RDES4_PMT_SHIFT) |
Definition at line 708 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_PDLYRQ (0x05<<ETH_RDES4_PMT_SHIFT) |
Definition at line 713 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_PDLYRSP (0x06<<ETH_RDES4_PMT_SHIFT) |
Definition at line 714 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_PDLYRSPFUP (0x07<<ETH_RDES4_PMT_SHIFT) |
Definition at line 715 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_SHIFT 8 |
Definition at line 706 of file mac_stm32fxx7.h.
#define ETH_RDES4_PMT_SYNC (0x01<<ETH_RDES4_PMT_SHIFT) |
Definition at line 709 of file mac_stm32fxx7.h.
#define ETH_RDES4_PV (1<<13) |
Definition at line 718 of file mac_stm32fxx7.h.
#define ETH_TDES0_CC (0x0F << ETH_TDES0_CC_SHIFT) |
Definition at line 603 of file mac_stm32fxx7.h.
#define ETH_TDES0_CC_SHIFT 3 |
Definition at line 602 of file mac_stm32fxx7.h.
#define ETH_TDES0_CIC (3<<ETH_TDES0_CIC_SHIFT) |
Definition at line 620 of file mac_stm32fxx7.h.
#define ETH_TDES0_CIC_DISABLED (0<<ETH_TDES0_CIC_SHIFT) |
Definition at line 621 of file mac_stm32fxx7.h.
#define ETH_TDES0_CIC_IP (1<<ETH_TDES0_CIC_SHIFT) |
Definition at line 622 of file mac_stm32fxx7.h.
#define ETH_TDES0_CIC_IPPL (2<<ETH_TDES0_CIC_SHIFT) |
Definition at line 623 of file mac_stm32fxx7.h.
#define ETH_TDES0_CIC_IPPLPH (3<<ETH_TDES0_CIC_SHIFT) |
Definition at line 624 of file mac_stm32fxx7.h.
#define ETH_TDES0_CIC_SHIFT 22 |
Definition at line 619 of file mac_stm32fxx7.h.
#define ETH_TDES0_DB (1<<0) |
Definition at line 598 of file mac_stm32fxx7.h.
#define ETH_TDES0_DC (1<<27) |
Definition at line 628 of file mac_stm32fxx7.h.
#define ETH_TDES0_DP (1<<26) |
Definition at line 627 of file mac_stm32fxx7.h.
#define ETH_TDES0_EC (1<<8) |
Definition at line 606 of file mac_stm32fxx7.h.
#define ETH_TDES0_ED (1<<2) |
Definition at line 600 of file mac_stm32fxx7.h.
#define ETH_TDES0_ES (1<<15) |
Definition at line 613 of file mac_stm32fxx7.h.
#define ETH_TDES0_FF (1<<13) |
Definition at line 611 of file mac_stm32fxx7.h.
#define ETH_TDES0_FS (1<<28) |
Definition at line 629 of file mac_stm32fxx7.h.
#define ETH_TDES0_IC (1<<30) |
Definition at line 631 of file mac_stm32fxx7.h.
#define ETH_TDES0_IHE (1<<16) |
Definition at line 614 of file mac_stm32fxx7.h.
#define ETH_TDES0_IPE (1<<12) |
Definition at line 610 of file mac_stm32fxx7.h.
#define ETH_TDES0_JT (1<<14) |
Definition at line 612 of file mac_stm32fxx7.h.
#define ETH_TDES0_LCA (1<<11) |
Definition at line 609 of file mac_stm32fxx7.h.
#define ETH_TDES0_LCO (1<<9) |
Definition at line 607 of file mac_stm32fxx7.h.
#define ETH_TDES0_LS (1<<29) |
Definition at line 630 of file mac_stm32fxx7.h.
#define ETH_TDES0_NC (1<<10) |
Definition at line 608 of file mac_stm32fxx7.h.
#define ETH_TDES0_OWN (1<<31) |
Definition at line 632 of file mac_stm32fxx7.h.
#define ETH_TDES0_TCH (1<<20) |
Definition at line 616 of file mac_stm32fxx7.h.
#define ETH_TDES0_TER (1<<21) |
Definition at line 617 of file mac_stm32fxx7.h.
#define ETH_TDES0_TTSE (1<<25) |
Definition at line 626 of file mac_stm32fxx7.h.
#define ETH_TDES0_TTSS (1<<17) |
Definition at line 615 of file mac_stm32fxx7.h.
#define ETH_TDES0_UF (1<<1) |
Definition at line 599 of file mac_stm32fxx7.h.
#define ETH_TDES0_VF (1<<7) |
Definition at line 605 of file mac_stm32fxx7.h.
#define ETH_TDES1_TBS1 (0x1FFF<<ETH_TDES1_TBS1_SHIFT) |
Definition at line 638 of file mac_stm32fxx7.h.
#define ETH_TDES1_TBS1_SHIFT 0 |
Definition at line 637 of file mac_stm32fxx7.h.
#define ETH_TDES1_TBS2 (0x1FFF<<ETH_TDES1_TBS1_SHIFT) |
Definition at line 641 of file mac_stm32fxx7.h.
#define ETH_TDES1_TBS2_SHIFT 16 |
Definition at line 640 of file mac_stm32fxx7.h.
enum eth_clk |
Enumerator | |
---|---|
ETH_CLK_025_035MHZ | |
ETH_CLK_035_060MHZ | |
ETH_CLK_060_100MHZ | |
ETH_CLK_100_150MHZ | |
ETH_CLK_150_168MHZ |
Definition at line 724 of file mac_stm32fxx7.h.
void eth_desc_init | ( | uint8_t * | buf, |
uint32_t | nTx, | ||
uint32_t | nRx, | ||
uint32_t | cTx, | ||
uint32_t | cRx, | ||
bool | isext | ||
) |
Initialize buffers and descriptors.
[in] | buf | uint8_t* Memory area for the descriptors and data buffers |
[in] | nTx | uint32_t Count of transmit descriptors (equal to count of buffers) |
[in] | nRx | uint32_t Count of receive descriptors (equal to count of buffers) |
[in] | cTx | uint32_t Bytes in each transmit buffer, must be a multiple of 4 |
[in] | cRx | uint32_t Bytes in each receive buffer, must be a multiple of 4 |
[in] | isext | bool true if extended descriptors should be used |
Note, the space passed via buf pointer must be large enough to hold all the buffers and one descriptor per buffer.
Definition at line 73 of file mac_stm32fxx7.c.
References ETH_DES0, ETH_DES1, ETH_DES2, ETH_DES3, ETH_DES_EXT_SIZE, ETH_DES_STD_SIZE, ETH_DMABMR, ETH_DMABMR_EDFE, ETH_DMARDLAR, ETH_DMATDLAR, ETH_RDES0_OWN, ETH_RDES1_RCH, ETH_TDES0_TCH, RxBD, and TxBD.
void eth_enable_checksum_offload | ( | void | ) |
Enable checksum offload feature.
This function will enable the Checksum offload feature for all of the transmit descriptors. Note to use this feature, descriptors must be in extended format.
Definition at line 279 of file mac_stm32fxx7.c.
References ETH_DES0, ETH_DES3, ETH_MACCR, ETH_MACCR_IPCO, ETH_TDES0_CIC_IPPLPH, and TxBD.
void eth_init | ( | uint8_t | phy, |
enum eth_clk | clock | ||
) |
Initialize ethernet.
This function will initialize ethernet, set up clocks, and initialize DMA.
[in] | phy | phy id |
[in] | clock | enum eth_clk Core clock speed |
Definition at line 209 of file mac_stm32fxx7.c.
References ETH_DMABMR, ETH_DMABMR_AAB, ETH_DMABMR_FB, ETH_DMABMR_PBL_SHIFT, ETH_DMABMR_PM_2_1, ETH_DMABMR_RDP_SHIFT, ETH_DMABMR_USP, ETH_DMAOMR, ETH_DMAOMR_DFRF, ETH_DMAOMR_DTCEFD, ETH_DMAOMR_FEF, ETH_DMAOMR_OSF, ETH_DMAOMR_RSF, ETH_DMAOMR_TSF, ETH_MACCR, ETH_MACCR_APCS, ETH_MACCR_CSTF, ETH_MACCR_DM, ETH_MACCR_FES, ETH_MACCR_RD, ETH_MACFCR, ETH_MACFCR_PT_SHIFT, ETH_MACFFR, ETH_MACFFR_PM, ETH_MACFFR_RA, ETH_MACHTHR, ETH_MACHTLR, ETH_MACMIIAR, ETH_MACVLANTR, and phy_reset().
bool eth_irq_ack_pending | ( | uint32_t | reason | ) |
Check if IRQ is pending, and acknowledge it.
[in] | reason | uint32_t Which irq type has to be tested |
Definition at line 265 of file mac_stm32fxx7.c.
References ETH_DMASR.
void eth_irq_disable | ( | uint32_t | reason | ) |
Disable the Ethernet IRQ.
[in] | reason | uint32_t Which irq will be disabled |
Definition at line 243 of file mac_stm32fxx7.c.
References ETH_DMAIER.
void eth_irq_enable | ( | uint32_t | reason | ) |
Enable the Ethernet IRQ.
[in] | reason | uint32_t Which irq will be enabled |
Definition at line 233 of file mac_stm32fxx7.c.
References ETH_DMAIER.
bool eth_irq_is_pending | ( | uint32_t | reason | ) |
Check if IRQ is pending.
[in] | reason | uint32_t Which irq type has to be tested |
Definition at line 254 of file mac_stm32fxx7.c.
References ETH_DMASR.
bool eth_rx | ( | uint8_t * | ppkt, |
uint32_t * | len, | ||
uint32_t | maxlen | ||
) |
Receive packet.
[in,out] | ppkt | uint8_t* Pointer to the data buffer where to store data |
[in,out] | len | uint32_t* Pointer to the variable with the packet length |
[in] | maxlen | uint32_t Maximum length of the packet |
Definition at line 154 of file mac_stm32fxx7.c.
References ETH_DES0, ETH_DES2, ETH_DES3, ETH_DMARPDR, ETH_DMASR, ETH_DMASR_RBUS, ETH_RDES0_FL, ETH_RDES0_FL_SHIFT, ETH_RDES0_FS, ETH_RDES0_LS, ETH_RDES0_OWN, and RxBD.
void eth_set_mac | ( | const uint8_t * | mac | ) |
Set MAC to the PHY.
[in] | mac | uint8_t* Desired MAC |
Definition at line 50 of file mac_stm32fxx7.c.
References ETH_MACA0HR_MACA0H, ETH_MACAHR, and ETH_MACALR.
void eth_smi_bit_clear | ( | uint8_t | phy, |
uint8_t | reg, | ||
uint16_t | clearbits | ||
) |
Clear bits in the register.
[in] | phy | uint8_t ID of the PHY (defaults to 1) |
[in] | reg | uint8_t Register address |
[in] | clearbits | uint16_t Bits that have to be cleared |
Definition at line 363 of file mac_stm32fxx7.c.
References eth_smi_read(), and eth_smi_write().
void eth_smi_bit_op | ( | uint8_t | phy, |
uint8_t | reg, | ||
uint16_t | bits, | ||
uint16_t | mask | ||
) |
Process the bit-operation on PHY register.
[in] | phy | uint8_t ID of the PHY (defaults to 1) |
[in] | reg | uint8_t Register address |
[in] | bits | uint16_t Bits that have to be set (or'ed) |
[in] | mask | uint16_t Bits that have to be clear (and'ed) |
Definition at line 350 of file mac_stm32fxx7.c.
References eth_smi_read(), and eth_smi_write().
Referenced by phy_autoneg_force().
void eth_smi_bit_set | ( | uint8_t | phy, |
uint8_t | reg, | ||
uint16_t | setbits | ||
) |
Set bits in the register.
[in] | phy | uint8_t ID of the PHY (defaults to 1) |
[in] | reg | uint8_t Register address |
[in] | setbits | uint16_t Bits that have to be set (or'ed) |
Definition at line 376 of file mac_stm32fxx7.c.
References eth_smi_read(), and eth_smi_write().
Referenced by phy_autoneg_enable().
uint16_t eth_smi_read | ( | uint8_t | phy, |
uint8_t | reg | ||
) |
Read the 16-bit register from the PHY.
[in] | phy | uint8_t ID of the PHY (defaults to 1) |
[in] | reg | uint8_t Register address |
Definition at line 330 of file mac_stm32fxx7.c.
References ETH_MACMIIAR, ETH_MACMIIAR_CR, ETH_MACMIIAR_MR_SHIFT, ETH_MACMIIAR_PA_SHIFT, ETH_MACMIIDR, ETH_MACMIIDR_MD, and eth_smi_transact().
Referenced by eth_smi_bit_clear(), eth_smi_bit_op(), eth_smi_bit_set(), phy_link_isup(), phy_link_status(), and phy_reset().
void eth_smi_write | ( | uint8_t | phy, |
uint8_t | reg, | ||
uint16_t | data | ||
) |
Write 16-bit register to the PHY.
[in] | phy | uint8_t ID of the PHY (defaults to 1) |
[in] | reg | uint8_t Register address |
[in] | data | uint16_t Data to write |
Definition at line 310 of file mac_stm32fxx7.c.
References ETH_MACMIIAR, ETH_MACMIIAR_CR, ETH_MACMIIAR_MR_SHIFT, ETH_MACMIIAR_MW, ETH_MACMIIAR_PA_SHIFT, ETH_MACMIIDR, ETH_MACMIIDR_MD, and eth_smi_transact().
Referenced by eth_smi_bit_clear(), eth_smi_bit_op(), eth_smi_bit_set(), and phy_reset().
void eth_start | ( | void | ) |
Start the Ethernet DMA processing.
Definition at line 191 of file mac_stm32fxx7.c.
References ETH_DMAOMR, ETH_DMAOMR_FTF, ETH_DMAOMR_SR, ETH_DMAOMR_ST, ETH_MACCR, ETH_MACCR_RE, and ETH_MACCR_TE.
bool eth_tx | ( | uint8_t * | ppkt, |
uint32_t | n | ||
) |
Transmit packet.
[in] | ppkt | uint8_t* Pointer to the beginning of the packet |
[in] | n | uint32_t Size of the packet |
Definition at line 126 of file mac_stm32fxx7.c.
References ETH_DES0, ETH_DES1, ETH_DES2, ETH_DES3, ETH_DMASR, ETH_DMASR_TBUS, ETH_DMATPDR, ETH_TDES0_FS, ETH_TDES0_LS, ETH_TDES0_OWN, ETH_TDES1_TBS1, and TxBD.