STM32H735xx HAL User Manual
Functions
Initialization and deinitialization functions
ETH Exported Functions

Initialization and Configuration functions. More...

Functions

HAL_StatusTypeDef HAL_ETH_Init (ETH_HandleTypeDef *heth)
 Initialize the Ethernet peripheral registers.
HAL_StatusTypeDef HAL_ETH_DeInit (ETH_HandleTypeDef *heth)
 DeInitializes the ETH peripheral.
__weak void HAL_ETH_MspInit (ETH_HandleTypeDef *heth)
 Initializes the ETH MSP.
__weak void HAL_ETH_MspDeInit (ETH_HandleTypeDef *heth)
 DeInitializes ETH MSP.
HAL_StatusTypeDef HAL_ETH_RegisterCallback (ETH_HandleTypeDef *heth, HAL_ETH_CallbackIDTypeDef CallbackID, pETH_CallbackTypeDef pCallback)
 Register a User ETH Callback To be used instead of the weak predefined callback.
HAL_StatusTypeDef HAL_ETH_UnRegisterCallback (ETH_HandleTypeDef *heth, HAL_ETH_CallbackIDTypeDef CallbackID)
 Unregister an ETH Callback ETH callabck is redirected to the weak predefined callback.
HAL_StatusTypeDef HAL_ETH_DescAssignMemory (ETH_HandleTypeDef *heth, uint32_t Index, uint8_t *pBuffer1, uint8_t *pBuffer2)
 Assign memory buffers to a DMA Rx descriptor.

Detailed Description

Initialization and Configuration functions.

===============================================================================
            ##### Initialization and Configuration functions #####
 ===============================================================================
    [..]  This subsection provides a set of functions allowing to initialize and
          deinitialize the ETH peripheral:

      (+) User must Implement HAL_ETH_MspInit() function in which he configures
          all related peripherals resources (CLOCK, GPIO and NVIC ).

      (+) Call the function HAL_ETH_Init() to configure the selected device with
          the selected configuration:
        (++) MAC address
        (++) Media interface (MII or RMII)
        (++) Rx DMA Descriptors Tab
        (++) Tx DMA Descriptors Tab
        (++) Length of Rx Buffers

      (+) Call the function HAL_ETH_DescAssignMemory() to assign data buffers
          for each Rx DMA Descriptor

      (+) Call the function HAL_ETH_DeInit() to restore the default configuration
          of the selected ETH peripheral.


Function Documentation

HAL_StatusTypeDef HAL_ETH_DeInit ( ETH_HandleTypeDef heth)

DeInitializes the ETH peripheral.

Parameters:
heth,:pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module
Return values:
HALstatus

Definition at line 402 of file stm32h7xx_hal_eth.c.

References __ETH_HandleTypeDef::gState, HAL_ETH_MspDeInit(), HAL_ETH_STATE_BUSY, HAL_ETH_STATE_RESET, and __ETH_HandleTypeDef::MspDeInitCallback.

HAL_StatusTypeDef HAL_ETH_DescAssignMemory ( ETH_HandleTypeDef heth,
uint32_t  Index,
uint8_t *  pBuffer1,
uint8_t *  pBuffer2 
)

Assign memory buffers to a DMA Rx descriptor.

Parameters:
heth,:pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module
Index: index of the DMA Rx descriptor this parameter can be a value from 0x0 to (ETH_RX_DESC_CNT -1)
pBuffer1,:address of buffer 1
pBuffer2,:address of buffer 2 if available
Return values:
HALstatus

Definition at line 691 of file stm32h7xx_hal_eth.c.

References ETH_DMADescTypeDef::BackupAddr0, ETH_DMADescTypeDef::BackupAddr1, ETH_DMADescTypeDef::DESC0, ETH_DMADescTypeDef::DESC2, ETH_DMADescTypeDef::DESC3, __ETH_HandleTypeDef::ErrorCode, ETH_DMARXNDESCRF_BUF1V, ETH_DMARXNDESCRF_BUF2V, ETH_DMARXNDESCRF_OWN, ETH_RX_DESC_CNT, HAL_ETH_ERROR_PARAM, ETH_RxDescListTypeDef::RxDesc, and __ETH_HandleTypeDef::RxDescList.

HAL_StatusTypeDef HAL_ETH_Init ( ETH_HandleTypeDef heth)

DeInitializes ETH MSP.

Parameters:
heth,:pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module
Return values:
None

Definition at line 450 of file stm32h7xx_hal_eth.c.

Referenced by HAL_ETH_DeInit(), and HAL_ETH_UnRegisterCallback().

Initializes the ETH MSP.

Parameters:
heth,:pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module
Return values:
None

Definition at line 435 of file stm32h7xx_hal_eth.c.

Referenced by HAL_ETH_Init(), and HAL_ETH_UnRegisterCallback().

HAL_StatusTypeDef HAL_ETH_RegisterCallback ( ETH_HandleTypeDef heth,
HAL_ETH_CallbackIDTypeDef  CallbackID,
pETH_CallbackTypeDef  pCallback 
)

Register a User ETH Callback To be used instead of the weak predefined callback.

Parameters:
hetheth handle
CallbackIDID of the callback to be registered This parameter can be one of the following values:
pCallbackpointer to the Callback function
Return values:
status

Definition at line 478 of file stm32h7xx_hal_eth.c.

References __ETH_HandleTypeDef::DMAErrorCallback, __ETH_HandleTypeDef::EEECallback, __ETH_HandleTypeDef::ErrorCode, __ETH_HandleTypeDef::gState, HAL_ETH_DMA_ERROR_CB_ID, HAL_ETH_EEE_CB_ID, HAL_ETH_ERROR_INVALID_CALLBACK, HAL_ETH_MAC_ERROR_CB_ID, HAL_ETH_MSPDEINIT_CB_ID, HAL_ETH_MSPINIT_CB_ID, HAL_ETH_PMT_CB_ID, HAL_ETH_RX_COMPLETE_CB_ID, HAL_ETH_STATE_READY, HAL_ETH_STATE_RESET, HAL_ETH_TX_COMPLETE_CB_ID, HAL_ETH_WAKEUP_CB_ID, __ETH_HandleTypeDef::MACErrorCallback, __ETH_HandleTypeDef::MspDeInitCallback, __ETH_HandleTypeDef::MspInitCallback, __ETH_HandleTypeDef::PMTCallback, __ETH_HandleTypeDef::RxCpltCallback, __ETH_HandleTypeDef::TxCpltCallback, and __ETH_HandleTypeDef::WakeUpCallback.

HAL_StatusTypeDef HAL_ETH_UnRegisterCallback ( ETH_HandleTypeDef heth,
HAL_ETH_CallbackIDTypeDef  CallbackID 
)

Unregister an ETH Callback ETH callabck is redirected to the weak predefined callback.

Parameters:
hetheth handle
CallbackIDID of the callback to be unregistered This parameter can be one of the following values:
Return values:
status

Definition at line 591 of file stm32h7xx_hal_eth.c.

References __ETH_HandleTypeDef::DMAErrorCallback, __ETH_HandleTypeDef::EEECallback, __ETH_HandleTypeDef::ErrorCode, __ETH_HandleTypeDef::gState, HAL_ETH_DMA_ERROR_CB_ID, HAL_ETH_DMAErrorCallback(), HAL_ETH_EEE_CB_ID, HAL_ETH_EEECallback(), HAL_ETH_ERROR_INVALID_CALLBACK, HAL_ETH_MAC_ERROR_CB_ID, HAL_ETH_MACErrorCallback(), HAL_ETH_MspDeInit(), HAL_ETH_MSPDEINIT_CB_ID, HAL_ETH_MspInit(), HAL_ETH_MSPINIT_CB_ID, HAL_ETH_PMT_CB_ID, HAL_ETH_PMTCallback(), HAL_ETH_RX_COMPLETE_CB_ID, HAL_ETH_RxCpltCallback(), HAL_ETH_STATE_READY, HAL_ETH_STATE_RESET, HAL_ETH_TX_COMPLETE_CB_ID, HAL_ETH_TxCpltCallback(), HAL_ETH_WAKEUP_CB_ID, HAL_ETH_WakeUpCallback(), __ETH_HandleTypeDef::MACErrorCallback, __ETH_HandleTypeDef::MspDeInitCallback, __ETH_HandleTypeDef::MspInitCallback, __ETH_HandleTypeDef::PMTCallback, __ETH_HandleTypeDef::RxCpltCallback, __ETH_HandleTypeDef::TxCpltCallback, and __ETH_HandleTypeDef::WakeUpCallback.