STM32F439xx HAL User Manual
Functions
IO operation functions
ETH Exported Functions

Data transfers functions. More...

Functions

HAL_StatusTypeDef HAL_ETH_TransmitFrame (ETH_HandleTypeDef *heth, uint32_t FrameLength)
 Sends an Ethernet frame.
HAL_StatusTypeDef HAL_ETH_GetReceivedFrame (ETH_HandleTypeDef *heth)
 Checks for received frames.
HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT (ETH_HandleTypeDef *heth)
 Gets the Received frame in interrupt mode.
void HAL_ETH_IRQHandler (ETH_HandleTypeDef *heth)
 This function handles ETH interrupt request.
__weak void HAL_ETH_TxCpltCallback (ETH_HandleTypeDef *heth)
 Tx Transfer completed callbacks.
__weak void HAL_ETH_RxCpltCallback (ETH_HandleTypeDef *heth)
 Rx Transfer completed callbacks.
__weak void HAL_ETH_ErrorCallback (ETH_HandleTypeDef *heth)
 Ethernet transfer error callbacks.
HAL_StatusTypeDef HAL_ETH_ReadPHYRegister (ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue)
 Reads a PHY register.
HAL_StatusTypeDef HAL_ETH_WritePHYRegister (ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue)
 Writes to a PHY register.

Detailed Description

Data transfers functions.

  ==============================================================================
                          ##### IO operation functions #####
  ==============================================================================  
  [..]  This section provides functions allowing to:
        (+) Transmit a frame
            HAL_ETH_TransmitFrame();
        (+) Receive a frame
            HAL_ETH_GetReceivedFrame();
            HAL_ETH_GetReceivedFrame_IT();
        (+) Read from an External PHY register
            HAL_ETH_ReadPHYRegister();
        (+) Write to an External PHY register
            HAL_ETH_WritePHYRegister();

  

Function Documentation

Ethernet transfer error callbacks.

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

Definition at line 1037 of file stm32f4xx_hal_eth.c.

Referenced by HAL_ETH_IRQHandler().

HAL_StatusTypeDef HAL_ETH_GetReceivedFrame ( ETH_HandleTypeDef heth)
HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT ( ETH_HandleTypeDef heth)

This function handles ETH interrupt request.

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

Definition at line 947 of file stm32f4xx_hal_eth.c.

References __HAL_ETH_DMA_CLEAR_IT, __HAL_ETH_DMA_GET_FLAG, ETH_DMA_FLAG_AIS, ETH_DMA_FLAG_R, ETH_DMA_FLAG_T, ETH_DMA_IT_NIS, ETH_DMA_IT_R, ETH_DMA_IT_T, HAL_ETH_ErrorCallback(), HAL_ETH_RxCpltCallback(), HAL_ETH_STATE_READY, HAL_ETH_TxCpltCallback(), and ETH_HandleTypeDef::State.

HAL_StatusTypeDef HAL_ETH_ReadPHYRegister ( ETH_HandleTypeDef heth,
uint16_t  PHYReg,
uint32_t *  RegValue 
)

Reads a PHY register.

Parameters:
hethpointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module
PHYRegPHY register address, is the index of one of the 32 PHY register. This parameter can be one of the following values: PHY_BCR: Transceiver Basic Control Register, PHY_BSR: Transceiver Basic Status Register. More PHY register could be read depending on the used PHY
RegValuePHY register value
Return values:
HALstatus

Definition at line 1058 of file stm32f4xx_hal_eth.c.

References assert_param, ETH_MACMIIAR_CR_MASK, HAL_ETH_STATE_BUSY_RD, HAL_ETH_STATE_READY, HAL_GetTick(), ETH_HandleTypeDef::Init, ETH_HandleTypeDef::Instance, IS_ETH_PHY_ADDRESS, PHY_READ_TO, ETH_InitTypeDef::PhyAddress, and ETH_HandleTypeDef::State.

Referenced by HAL_ETH_Init().

Rx Transfer completed callbacks.

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

Definition at line 1022 of file stm32f4xx_hal_eth.c.

Referenced by HAL_ETH_IRQHandler().

HAL_StatusTypeDef HAL_ETH_TransmitFrame ( ETH_HandleTypeDef heth,
uint32_t  FrameLength 
)

Sends an Ethernet frame.

Parameters:
hethpointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module
FrameLengthAmount of data to be sent
Return values:
HALstatus

Definition at line 669 of file stm32f4xx_hal_eth.c.

References ETH_DMADescTypeDef::Buffer2NextDescAddr, ETH_DMADescTypeDef::ControlBufferSize, ETH_DMATXDESC_FS, ETH_DMATXDESC_LS, ETH_DMATXDESC_OWN, ETH_DMATXDESC_TBS1, ETH_TX_BUF_SIZE, HAL_ETH_STATE_BUSY, HAL_ETH_STATE_BUSY_TX, HAL_ETH_STATE_READY, ETH_HandleTypeDef::Instance, ETH_HandleTypeDef::State, ETH_DMADescTypeDef::Status, and ETH_HandleTypeDef::TxDesc.

Tx Transfer completed callbacks.

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

Definition at line 1007 of file stm32f4xx_hal_eth.c.

Referenced by HAL_ETH_IRQHandler().

HAL_StatusTypeDef HAL_ETH_WritePHYRegister ( ETH_HandleTypeDef heth,
uint16_t  PHYReg,
uint32_t  RegValue 
)

Writes to a PHY register.

Parameters:
hethpointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module
PHYRegPHY register address, is the index of one of the 32 PHY register. This parameter can be one of the following values: PHY_BCR: Transceiver Control Register. More PHY register could be written depending on the used PHY
RegValuethe value to write
Return values:
HALstatus

Definition at line 1130 of file stm32f4xx_hal_eth.c.

References assert_param, ETH_MACMIIAR_CR_MASK, HAL_ETH_STATE_BUSY_WR, HAL_ETH_STATE_READY, HAL_GetTick(), ETH_HandleTypeDef::Init, ETH_HandleTypeDef::Instance, IS_ETH_PHY_ADDRESS, PHY_WRITE_TO, ETH_InitTypeDef::PhyAddress, and ETH_HandleTypeDef::State.

Referenced by HAL_ETH_Init().