From 9f95ff5b6ba01db09552b84a0ab79607060a2666 Mon Sep 17 00:00:00 2001 From: Ali Labbene Date: Wed, 11 Dec 2019 08:59:21 +0100 Subject: Official ARM version: v5.4.0 Add CMSIS V5.4.0, please refer to index.html available under \docs folder. Note: content of \CMSIS\Core\Include has been copied under \Include to keep the same structure used in existing projects, and thus avoid projects mass update Note: the following components have been removed from ARM original delivery (as not used in ST packages) - CMSIS_EW2018.pdf - .gitattributes - .gitignore - \Device - \CMSIS - \CoreValidation - \DAP - \Documentation - \DoxyGen - \Driver - \Pack - \RTOS\CMSIS_RTOS_Tutorial.pdf - \RTOS\RTX - \RTOS\Template - \RTOS2\RTX - \Utilities - All ARM/GCC projects files are deleted from \DSP, \RTOS and \RTOS2 Change-Id: Ia026c3f0f0d016627a4fb5a9032852c33d24b4d3 --- docs/Driver/html/group__eth__interface__gr.html | 363 ++++++++++++++++++++++++ 1 file changed, 363 insertions(+) create mode 100644 docs/Driver/html/group__eth__interface__gr.html (limited to 'docs/Driver/html/group__eth__interface__gr.html') diff --git a/docs/Driver/html/group__eth__interface__gr.html b/docs/Driver/html/group__eth__interface__gr.html new file mode 100644 index 0000000..9f29afe --- /dev/null +++ b/docs/Driver/html/group__eth__interface__gr.html @@ -0,0 +1,363 @@ + + + + + +Ethernet Interface +CMSIS-Driver: Ethernet Interface + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CMSIS-Driver +  Version 2.6.0 +
+
Peripheral Interface for Middleware and Application Code
+
+
+ +
+
    + +
+
+ + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
Ethernet Interface
+
+
+ +

Ethernet common definitions (Driver_ETH.h) +More...

+ + + + + + + + + + + +

+Content

 Media Interface Types
 Ethernet Media Interface type.
 
 Ethernet MAC Interface
 Driver API for Ethernet MAC Peripheral (Driver_ETH_MAC.h)
 
 Ethernet PHY Interface
 Driver API for Ethernet PHY Peripheral (Driver_ETH_PHY.h)
 
+ + + + + + + +

+Data Structures

struct  ARM_ETH_MAC_ADDR
 Ethernet MAC Address. More...
 
+ + + + +

+Enumerations

enum  ARM_ETH_LINK_STATE {
+  ARM_ETH_LINK_DOWN, +
+  ARM_ETH_LINK_UP +
+ }
 Ethernet link state. More...
 
+

Description

+

Ethernet common definitions (Driver_ETH.h)

+

Ethernet is a networking technology for exchanging data packages between computer systems. Several microcontrollers integrate an Ethernet MAC (Media Access Control) data-link layer that interfaces to an Ethernet PHY (Physical Interface Transceiver).

+

Wikipedia offers more information about the Ethernet.

+

Block Diagram

+

The Ethernet PHY connects typically to the Ethernet MAC using an MII (Media Independent Interface) or RMII (Reduced Media Independent Interface).

+


+

+
+EthernetSchematic.png +
+Block Diagram of a typical Ethernet Interface
+

Ethernet API

+

The following header files define the Application Programming Interface (API) for the Ethernet interface:

+
    +
  • Driver_ETH.h : Common definitions of the Ethernet PHY and MAC part
  • +
  • Driver_ETH_MAC.h : API for the Ethernet MAC
  • +
  • Driver_ETH_PHY.h : API for the Ethernet PHY
  • +
+

The driver implementation of the Ethernet MAC is a typical part of a Device Family Pack (DFP) that supports the peripherals of the microcontroller family. The driver implementation of the Ethernet PHY is a typical part of a Network Software Pack, since PHY is typically not integrated into the microcontroller.

+
Note
For parameters, the value marked with (default) is the setting after the driver initialization.
+

Driver Functions

+

The driver functions are published in the access struct as explained in Common Driver Functions

+ +

Both drivers are used in combination and usually the Ethernet MAC provides a media interface to the Ethernet PHY. A typical setup sequence for the drivers is shown below:

+

Example Code

+

The following example code shows the usage of the Ethernet interface.

+
extern ARM_DRIVER_ETH_MAC Driver_ETH_MAC0;
+
extern ARM_DRIVER_ETH_PHY Driver_ETH_PHY0;
+
+
static ARM_DRIVER_ETH_MAC *mac;
+
static ARM_DRIVER_ETH_PHY *phy;
+
static ARM_ETH_MAC_ADDR own_mac_address;
+
static ARM_ETH_MAC_CAPABILITIES capabilities;
+
+
void ethernet_mac_notify (uint32_t event) {
+
switch (event) {
+
:
+
}
+
}
+
+
+
void initialize_ethernet_interface (void) {
+
mac = &Driver_ETH_MAC0;
+
phy = &Driver_ETH_PHY0;
+
+
// Initialize Media Access Controller
+
capabilities = mac->GetCapabilities ();
+
+
mac->Initialize (ethernet_mac_notify);
+ +
+
if (capabilities.mac_address == 0) {
+
// populate own_mac_address with the address to use
+
mac->SetMacAddress(&own_mac_address);
+
}
+
else {
+
mac->GetMacAddress(&own_mac_address);
+
}
+
+
// Initialize Physical Media Interface
+
if (phy->Initialize (mac->PHY_Read, mac->PHY_Write) == ARM_DRIVER_OK) {
+ +
phy->SetInterface (capabilities.media_interface);
+ +
}
+
:
+
:
+
}
+
+
+
static ARM_ETH_LINK_STATE ethernet_link; // current link status
+
+
void ethernet_check_link_status (void) {
+ +
+
link = phy->GetLinkState ();
+
if (link == ethernet_link) {
+
return; // link state unchanged
+
}
+
// link state changed
+
ethernet_link = link;
+
if (link == ARM_ETH_LINK_UP) { // start transfer
+ + + + + + + +
}
+
else { // stop transfer
+ + + +
}
+
}
+

Data Structure Documentation

+ +
+
+ + + + +
struct ARM_ETH_LINK_INFO
+
+

Ethernet link information.

+

The Ethernet Link information provides parameters about the current established communication.

+

Returned by:

+ +
+ + + + + + + + + + +
Data Fields
+uint32_t +speed: 2 +Link speed: 0= 10 MBit, 1= 100 MBit, 2= 1 GBit.
+uint32_t +duplex: 1 +Duplex mode: 0= Half, 1= Full.
+uint32_t +reserved: 29 +
+ +
+
+ +
+
+ + + + +
struct ARM_ETH_MAC_ADDR
+
+

Ethernet MAC Address.

+

Stores the MAC Address of the Ethernet interface as defined by IEEE 802. Wikipedia offers more information about the MAC Address.

+

Parameter for:

+ +
+ + + + +
Data Fields
+uint8_t +b[6] +MAC Address (6 bytes), MSB first.
+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
enum ARM_ETH_LINK_STATE
+
+ +

Ethernet link state.

+

The Ethernet Link status shows if the communication is currently established (up) or interrupted (down).

+

Returned by:

+ + + + +
Enumerator
ARM_ETH_LINK_DOWN  +

Link is down.

+
ARM_ETH_LINK_UP  +

Link is up.

+
+ +
+
+
+
+ + + + -- cgit