STM32H735xx HAL User Manual
|
ETH Transmit and Receive functions. More...
Functions | |
HAL_StatusTypeDef | HAL_ETH_Start (ETH_HandleTypeDef *heth) |
Enables Ethernet MAC and DMA reception and transmission. | |
HAL_StatusTypeDef | HAL_ETH_Start_IT (ETH_HandleTypeDef *heth) |
Enables Ethernet MAC and DMA reception/transmission in Interrupt mode. | |
HAL_StatusTypeDef | HAL_ETH_Stop (ETH_HandleTypeDef *heth) |
Stop Ethernet MAC and DMA reception/transmission. | |
HAL_StatusTypeDef | HAL_ETH_Stop_IT (ETH_HandleTypeDef *heth) |
Stop Ethernet MAC and DMA reception/transmission in Interrupt mode. | |
HAL_StatusTypeDef | HAL_ETH_Transmit (ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig, uint32_t Timeout) |
Sends an Ethernet Packet in polling mode. | |
HAL_StatusTypeDef | HAL_ETH_Transmit_IT (ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig) |
Sends an Ethernet Packet in interrupt mode. | |
uint8_t | HAL_ETH_IsRxDataAvailable (ETH_HandleTypeDef *heth) |
Checks for received Packets. | |
HAL_StatusTypeDef | HAL_ETH_GetRxDataBuffer (ETH_HandleTypeDef *heth, ETH_BufferTypeDef *RxBuffer) |
This function gets the buffer address of last received Packet. | |
HAL_StatusTypeDef | HAL_ETH_GetRxDataLength (ETH_HandleTypeDef *heth, uint32_t *Length) |
This function gets the length of last received Packet. | |
HAL_StatusTypeDef | HAL_ETH_GetRxDataInfo (ETH_HandleTypeDef *heth, ETH_RxPacketInfo *RxPacketInfo) |
Get the Rx data info (Packet type, VLAN tag, Filters status, ...) | |
HAL_StatusTypeDef | HAL_ETH_BuildRxDescriptors (ETH_HandleTypeDef *heth) |
This function gives back Rx Desc of the last received Packet to the DMA, so ETH DMA will be able to use these descriptors to receive next Packets. | |
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_DMAErrorCallback (ETH_HandleTypeDef *heth) |
Ethernet DMA transfer error callbacks. | |
__weak void | HAL_ETH_MACErrorCallback (ETH_HandleTypeDef *heth) |
Ethernet MAC transfer error callbacks. | |
__weak void | HAL_ETH_PMTCallback (ETH_HandleTypeDef *heth) |
Ethernet Power Management module IT callback. | |
__weak void | HAL_ETH_EEECallback (ETH_HandleTypeDef *heth) |
Energy Efficient Etherent IT callback. | |
__weak void | HAL_ETH_WakeUpCallback (ETH_HandleTypeDef *heth) |
ETH WAKEUP interrupt callback. | |
HAL_StatusTypeDef | HAL_ETH_ReadPHYRegister (ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg, uint32_t *pRegValue) |
Read a PHY register. | |
HAL_StatusTypeDef | HAL_ETH_WritePHYRegister (ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg, uint32_t RegValue) |
Writes to a PHY register. |
ETH Transmit and Receive functions.
============================================================================== ##### IO operation functions ##### ============================================================================== [..] This subsection provides a set of functions allowing to manage the ETH data transfer.
HAL_StatusTypeDef HAL_ETH_BuildRxDescriptors | ( | ETH_HandleTypeDef * | heth | ) |
This function gives back Rx Desc of the last received Packet to the DMA, so ETH DMA will be able to use these descriptors to receive next Packets.
It should be called after processing the received Packet.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
HAL | status. |
Definition at line 1408 of file stm32h7xx_hal_eth.c.
References ETH_RxDescListTypeDef::AppContextDesc, ETH_RxDescListTypeDef::AppDescNbr, ETH_DMARXNDESCRF_BUF1V, ETH_DMARXNDESCRF_BUF2V, ETH_DMARXNDESCRF_IOC, ETH_DMARXNDESCRF_OWN, ETH_RxDescListTypeDef::FirstAppDesc, INCR_RX_DESC_INDEX, __ETH_HandleTypeDef::Instance, ETH_RxDescListTypeDef::ItMode, ETH_RxDescListTypeDef::RxDesc, and __ETH_HandleTypeDef::RxDescList.
void HAL_ETH_DMAErrorCallback | ( | ETH_HandleTypeDef * | heth | ) |
Ethernet DMA transfer error callbacks.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
None |
Definition at line 1693 of file stm32h7xx_hal_eth.c.
Referenced by ETH_InitCallbacksToDefault(), HAL_ETH_IRQHandler(), and HAL_ETH_UnRegisterCallback().
void HAL_ETH_EEECallback | ( | ETH_HandleTypeDef * | heth | ) |
Energy Efficient Etherent IT callback.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
None |
Definition at line 1738 of file stm32h7xx_hal_eth.c.
Referenced by ETH_InitCallbacksToDefault(), HAL_ETH_IRQHandler(), and HAL_ETH_UnRegisterCallback().
HAL_StatusTypeDef HAL_ETH_GetRxDataBuffer | ( | ETH_HandleTypeDef * | heth, |
ETH_BufferTypeDef * | RxBuffer | ||
) |
This function gets the buffer address of last received Packet.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
RxBuffer,: | Pointer to a ETH_BufferTypeDef structure |
HAL | status |
Definition at line 1206 of file stm32h7xx_hal_eth.c.
References ETH_RxDescListTypeDef::AppDescNbr, __ETH_HandleTypeDef::ErrorCode, ETH_DMARXNDESCWBF_PL, ETH_RxDescListTypeDef::FirstAppDesc, HAL_ETH_ERROR_PARAM, HAL_ETH_IsRxDataAvailable(), INCR_RX_DESC_INDEX, __ETH_HandleTypeDef::Init, ETH_InitTypeDef::RxBuffLen, ETH_RxDescListTypeDef::RxDesc, and __ETH_HandleTypeDef::RxDescList.
HAL_StatusTypeDef HAL_ETH_GetRxDataInfo | ( | ETH_HandleTypeDef * | heth, |
ETH_RxPacketInfo * | RxPacketInfo | ||
) |
Get the Rx data info (Packet type, VLAN tag, Filters status, ...)
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
RxPacketInfo,: | parameter to hold info of received buffer |
HAL | status |
Definition at line 1335 of file stm32h7xx_hal_eth.c.
References ETH_RxDescListTypeDef::AppDescNbr, ETH_RxPacketInfo::Checksum, ETH_RxPacketInfo::ErrorCode, ETH_DMARXNDESCWBF_DAF, ETH_DMARXNDESCWBF_ERRORS_MASK, ETH_DMARXNDESCWBF_ES, ETH_DMARXNDESCWBF_HF, ETH_DMARXNDESCWBF_IPCB, ETH_DMARXNDESCWBF_IPCE, ETH_DMARXNDESCWBF_IPHE, ETH_DMARXNDESCWBF_IPV4, ETH_DMARXNDESCWBF_IPV6, ETH_DMARXNDESCWBF_IVT, ETH_DMARXNDESCWBF_L3FM, ETH_DMARXNDESCWBF_L3L4FM, ETH_DMARXNDESCWBF_L4FM, ETH_DMARXNDESCWBF_LT, ETH_DMARXNDESCWBF_LT_DVLAN, ETH_DMARXNDESCWBF_OVT, ETH_DMARXNDESCWBF_PT, ETH_DMARXNDESCWBF_RS0V, ETH_DMARXNDESCWBF_RS1V, ETH_DMARXNDESCWBF_RS2V, ETH_DMARXNDESCWBF_SAF, ETH_DMARXNDESCWBF_VF, ETH_RxDescListTypeDef::FirstAppDesc, HAL_ETH_IsRxDataAvailable(), ETH_RxPacketInfo::HeaderType, INCR_RX_DESC_INDEX, ETH_RxPacketInfo::InnerVlanTag, ETH_RxPacketInfo::L3FilterStatus, ETH_RxPacketInfo::L4FilterStatus, ETH_RxPacketInfo::MacFilterStatus, ETH_RxPacketInfo::PayloadType, ETH_RxDescListTypeDef::RxDesc, __ETH_HandleTypeDef::RxDescList, ETH_RxPacketInfo::SegmentCnt, and ETH_RxPacketInfo::VlanTag.
HAL_StatusTypeDef HAL_ETH_GetRxDataLength | ( | ETH_HandleTypeDef * | heth, |
uint32_t * | Length | ||
) |
This function gets the length of last received Packet.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
Length,: | parameter to hold Rx packet length |
HAL | Status |
Definition at line 1303 of file stm32h7xx_hal_eth.c.
References ETH_RxDescListTypeDef::AppDescNbr, ETH_DMARXNDESCWBF_PL, ETH_RxDescListTypeDef::FirstAppDesc, HAL_ETH_IsRxDataAvailable(), INCR_RX_DESC_INDEX, ETH_RxDescListTypeDef::RxDesc, and __ETH_HandleTypeDef::RxDescList.
void HAL_ETH_IRQHandler | ( | ETH_HandleTypeDef * | heth | ) |
This function handles ETH interrupt request.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
HAL | status |
Definition at line 1474 of file stm32h7xx_hal_eth.c.
References __HAL_ETH_DMA_CLEAR_IT, __HAL_ETH_DMA_DISABLE_IT, __HAL_ETH_DMA_GET_IT, __HAL_ETH_DMA_GET_IT_SOURCE, __HAL_ETH_MAC_GET_IT, __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG, __HAL_ETH_WAKEUP_EXTI_GET_FLAG, CM7_CPUID, __ETH_HandleTypeDef::DMAErrorCallback, __ETH_HandleTypeDef::DMAErrorCode, __ETH_HandleTypeDef::EEECallback, __ETH_HandleTypeDef::ErrorCode, ETH_MAC_LPI_IT, ETH_MAC_PMT_IT, ETH_WAKEUP_EXTI_LINE, __ETH_HandleTypeDef::gState, HAL_ETH_DMAErrorCallback(), HAL_ETH_EEECallback(), HAL_ETH_ERROR_DMA, HAL_ETH_MACErrorCallback(), HAL_ETH_PMTCallback(), HAL_ETH_RxCpltCallback(), HAL_ETH_STATE_ERROR, HAL_ETH_TxCpltCallback(), HAL_ETH_WakeUpCallback(), HAL_GetCurrentCPUID(), __ETH_HandleTypeDef::Instance, __ETH_HandleTypeDef::MACErrorCallback, __ETH_HandleTypeDef::MACErrorCode, __ETH_HandleTypeDef::MACLPIEvent, __ETH_HandleTypeDef::MACWakeUpEvent, __ETH_HandleTypeDef::PMTCallback, __ETH_HandleTypeDef::RxCpltCallback, __ETH_HandleTypeDef::TxCpltCallback, and __ETH_HandleTypeDef::WakeUpCallback.
uint8_t HAL_ETH_IsRxDataAvailable | ( | ETH_HandleTypeDef * | heth | ) |
Checks for received Packets.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
1,: | A Packet is received 0: no Packet received |
Definition at line 1069 of file stm32h7xx_hal_eth.c.
References ETH_RxDescListTypeDef::AppContextDesc, ETH_RxDescListTypeDef::AppDescNbr, ETH_DMADescTypeDef::BackupAddr0, ETH_DMADescTypeDef::BackupAddr1, ETH_RxDescListTypeDef::CurRxDesc, ETH_DMADescTypeDef::DESC0, ETH_DMADescTypeDef::DESC2, ETH_DMADescTypeDef::DESC3, ETH_DMARXNDESCRF_BUF1V, ETH_DMARXNDESCRF_BUF2V, ETH_DMARXNDESCRF_IOC, ETH_DMARXNDESCRF_OWN, ETH_DMARXNDESCWBF_CTXT, ETH_DMARXNDESCWBF_FD, ETH_DMARXNDESCWBF_LD, ETH_DMARXNDESCWBF_OWN, ETH_RX_DESC_CNT, ETH_RxDescListTypeDef::FirstAppDesc, INCR_RX_DESC_INDEX, __ETH_HandleTypeDef::Instance, ETH_RxDescListTypeDef::ItMode, ETH_RxDescListTypeDef::RxDesc, and __ETH_HandleTypeDef::RxDescList.
Referenced by HAL_ETH_GetRxDataBuffer(), HAL_ETH_GetRxDataInfo(), and HAL_ETH_GetRxDataLength().
void HAL_ETH_MACErrorCallback | ( | ETH_HandleTypeDef * | heth | ) |
Ethernet MAC transfer error callbacks.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
None |
Definition at line 1708 of file stm32h7xx_hal_eth.c.
Referenced by ETH_InitCallbacksToDefault(), HAL_ETH_IRQHandler(), and HAL_ETH_UnRegisterCallback().
void HAL_ETH_PMTCallback | ( | ETH_HandleTypeDef * | heth | ) |
Ethernet Power Management module IT callback.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
None |
Definition at line 1723 of file stm32h7xx_hal_eth.c.
Referenced by ETH_InitCallbacksToDefault(), HAL_ETH_IRQHandler(), and HAL_ETH_UnRegisterCallback().
HAL_StatusTypeDef HAL_ETH_ReadPHYRegister | ( | ETH_HandleTypeDef * | heth, |
uint32_t | PHYAddr, | ||
uint32_t | PHYReg, | ||
uint32_t * | pRegValue | ||
) |
Read a PHY register.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
PHYAddr,: | PHY port address, must be a value from 0 to 31 |
PHYReg,: | PHY register address, must be a value from 0 to 31 |
pRegValue,: | parameter to hold read value |
HAL | status |
Definition at line 1771 of file stm32h7xx_hal_eth.c.
References ETH_MDIO_BUS_TIMEOUT, HAL_GetTick(), and __ETH_HandleTypeDef::Instance.
void HAL_ETH_RxCpltCallback | ( | ETH_HandleTypeDef * | heth | ) |
Rx Transfer completed callbacks.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
None |
Definition at line 1678 of file stm32h7xx_hal_eth.c.
Referenced by ETH_InitCallbacksToDefault(), HAL_ETH_IRQHandler(), and HAL_ETH_UnRegisterCallback().
HAL_StatusTypeDef HAL_ETH_Start | ( | ETH_HandleTypeDef * | heth | ) |
Enables Ethernet MAC and DMA reception and transmission.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
HAL | status |
Definition at line 750 of file stm32h7xx_hal_eth.c.
References __ETH_HandleTypeDef::gState, HAL_ETH_STATE_BUSY, HAL_ETH_STATE_BUSY_RX, HAL_ETH_STATE_READY, __ETH_HandleTypeDef::Instance, and __ETH_HandleTypeDef::RxState.
HAL_StatusTypeDef HAL_ETH_Start_IT | ( | ETH_HandleTypeDef * | heth | ) |
Enables Ethernet MAC and DMA reception/transmission in Interrupt mode.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
HAL | status |
Definition at line 791 of file stm32h7xx_hal_eth.c.
References __HAL_ETH_DMA_ENABLE_IT, ETH_DMADescTypeDef::DESC3, ETH_DMARXNDESCRF_IOC, ETH_RX_DESC_CNT, __ETH_HandleTypeDef::gState, HAL_ETH_STATE_BUSY, HAL_ETH_STATE_BUSY_RX, HAL_ETH_STATE_READY, __ETH_HandleTypeDef::Instance, ETH_RxDescListTypeDef::ItMode, ETH_RxDescListTypeDef::RxDesc, __ETH_HandleTypeDef::RxDescList, and __ETH_HandleTypeDef::RxState.
HAL_StatusTypeDef HAL_ETH_Stop | ( | ETH_HandleTypeDef * | heth | ) |
Stop Ethernet MAC and DMA reception/transmission.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
HAL | status |
Definition at line 854 of file stm32h7xx_hal_eth.c.
References __ETH_HandleTypeDef::gState, HAL_ETH_STATE_BUSY, HAL_ETH_STATE_READY, HAL_ETH_STATE_RESET, __ETH_HandleTypeDef::Instance, and __ETH_HandleTypeDef::RxState.
HAL_StatusTypeDef HAL_ETH_Stop_IT | ( | ETH_HandleTypeDef * | heth | ) |
Stop Ethernet MAC and DMA reception/transmission in Interrupt mode.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
HAL | status |
Definition at line 894 of file stm32h7xx_hal_eth.c.
References __HAL_ETH_DMA_DISABLE_IT, ETH_DMADescTypeDef::DESC3, ETH_DMARXNDESCRF_IOC, ETH_RX_DESC_CNT, __ETH_HandleTypeDef::gState, HAL_ETH_STATE_BUSY, HAL_ETH_STATE_READY, HAL_ETH_STATE_RESET, __ETH_HandleTypeDef::Instance, ETH_RxDescListTypeDef::ItMode, ETH_RxDescListTypeDef::RxDesc, __ETH_HandleTypeDef::RxDescList, and __ETH_HandleTypeDef::RxState.
HAL_StatusTypeDef HAL_ETH_Transmit | ( | ETH_HandleTypeDef * | heth, |
ETH_TxPacketConfig * | pTxConfig, | ||
uint32_t | Timeout | ||
) |
Sends an Ethernet Packet in polling mode.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
pTxConfig,: | Hold the configuration of packet to be transmitted |
Timeout,: | timeout value |
HAL | status |
Definition at line 956 of file stm32h7xx_hal_eth.c.
References ETH_TxDescListTypeDef::CurTxDesc, ETH_DMADescTypeDef::DESC3, __ETH_HandleTypeDef::DMAErrorCode, __ETH_HandleTypeDef::ErrorCode, ETH_DMATXNDESCWBF_OWN, ETH_Prepare_Tx_Descriptors(), __ETH_HandleTypeDef::gState, HAL_ETH_ERROR_BUSY, HAL_ETH_ERROR_DMA, HAL_ETH_ERROR_NONE, HAL_ETH_ERROR_PARAM, HAL_ETH_ERROR_TIMEOUT, HAL_ETH_STATE_ERROR, HAL_ETH_STATE_READY, HAL_GetTick(), INCR_TX_DESC_INDEX, __ETH_HandleTypeDef::Instance, ETH_TxDescListTypeDef::TxDesc, and __ETH_HandleTypeDef::TxDescList.
HAL_StatusTypeDef HAL_ETH_Transmit_IT | ( | ETH_HandleTypeDef * | heth, |
ETH_TxPacketConfig * | pTxConfig | ||
) |
Sends an Ethernet Packet in interrupt mode.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
pTxConfig,: | Hold the configuration of packet to be transmitted |
HAL | status |
Definition at line 1029 of file stm32h7xx_hal_eth.c.
References ETH_TxDescListTypeDef::CurTxDesc, __ETH_HandleTypeDef::ErrorCode, ETH_Prepare_Tx_Descriptors(), __ETH_HandleTypeDef::gState, HAL_ETH_ERROR_BUSY, HAL_ETH_ERROR_NONE, HAL_ETH_ERROR_PARAM, HAL_ETH_STATE_READY, INCR_TX_DESC_INDEX, __ETH_HandleTypeDef::Instance, ETH_TxDescListTypeDef::TxDesc, and __ETH_HandleTypeDef::TxDescList.
void HAL_ETH_TxCpltCallback | ( | ETH_HandleTypeDef * | heth | ) |
Tx Transfer completed callbacks.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
None |
Definition at line 1663 of file stm32h7xx_hal_eth.c.
Referenced by ETH_InitCallbacksToDefault(), HAL_ETH_IRQHandler(), and HAL_ETH_UnRegisterCallback().
void HAL_ETH_WakeUpCallback | ( | ETH_HandleTypeDef * | heth | ) |
ETH WAKEUP interrupt callback.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
None |
Definition at line 1753 of file stm32h7xx_hal_eth.c.
Referenced by ETH_InitCallbacksToDefault(), HAL_ETH_IRQHandler(), and HAL_ETH_UnRegisterCallback().
HAL_StatusTypeDef HAL_ETH_WritePHYRegister | ( | ETH_HandleTypeDef * | heth, |
uint32_t | PHYAddr, | ||
uint32_t | PHYReg, | ||
uint32_t | RegValue | ||
) |
Writes to a PHY register.
heth,: | pointer to a ETH_HandleTypeDef structure that contains the configuration information for ETHERNET module |
PHYAddr,: | PHY port address, must be a value from 0 to 31 |
PHYReg,: | PHY register address, must be a value from 0 to 31 |
RegValue,: | the value to write |
HAL | status |
Definition at line 1825 of file stm32h7xx_hal_eth.c.
References ETH_MDIO_BUS_TIMEOUT, HAL_GetTick(), and __ETH_HandleTypeDef::Instance.