Skip to content

Commit cb592e9

Browse files
authored
Remove Dup function HAL_ETH_SetMDIOClockRange. (#711)
1 parent aef286a commit cb592e9

File tree

3 files changed

+0
-54
lines changed

3 files changed

+0
-54
lines changed

source/portable/NetworkInterface/STM32Hxx/NetworkInterface.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,6 @@ BaseType_t xNetworkInterfaceInitialise( void )
278278
HAL_ETH_DescAssignMemory( &( xEthHandle ), uxIndex, pucBuffer, NULL );
279279
}
280280

281-
/* Configure the MDIO Clock */
282-
HAL_ETH_SetMDIOClockRange( &( xEthHandle ) );
283-
284281
/* Initialize the MACB and set all PHY properties */
285282
prvMACBProbePhy();
286283

source/portable/NetworkInterface/STM32Hxx/stm32hxx_hal_eth.c

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,56 +2171,6 @@ extern SemaphoreHandle_t xTXDescriptorSemaphore;
21712171
}
21722172
}
21732173

2174-
/**
2175-
* @brief Configures the Clock range of ETH MDIO interface.
2176-
* @param heth: pointer to a ETH_HandleTypeDef structure that contains
2177-
* the configuration information for ETHERNET module
2178-
* @retval None
2179-
*/
2180-
void HAL_ETH_SetMDIOClockRange( ETH_HandleTypeDef * heth )
2181-
{
2182-
uint32_t tmpreg, hclk;
2183-
2184-
/* Get the ETHERNET MACMDIOAR value */
2185-
tmpreg = ( heth->Instance )->MACMDIOAR;
2186-
2187-
/* Clear CSR Clock Range bits */
2188-
tmpreg &= ~ETH_MACMDIOAR_CR;
2189-
2190-
/* Get hclk frequency value */
2191-
hclk = HAL_RCC_GetHCLKFreq();
2192-
2193-
/* Set CR bits depending on hclk value */
2194-
if( ( hclk >= 20000000U ) && ( hclk < 35000000U ) )
2195-
{
2196-
/* CSR Clock Range between 20-35 MHz */
2197-
tmpreg |= ( uint32_t ) ETH_MACMDIOAR_CR_DIV16;
2198-
}
2199-
else if( ( hclk >= 35000000U ) && ( hclk < 60000000U ) )
2200-
{
2201-
/* CSR Clock Range between 35-60 MHz */
2202-
tmpreg |= ( uint32_t ) ETH_MACMDIOAR_CR_DIV26;
2203-
}
2204-
else if( ( hclk >= 60000000U ) && ( hclk < 100000000U ) )
2205-
{
2206-
/* CSR Clock Range between 60-100 MHz */
2207-
tmpreg |= ( uint32_t ) ETH_MACMDIOAR_CR_DIV42;
2208-
}
2209-
else if( ( hclk >= 100000000U ) && ( hclk < 150000000U ) )
2210-
{
2211-
/* CSR Clock Range between 100-150 MHz */
2212-
tmpreg |= ( uint32_t ) ETH_MACMDIOAR_CR_DIV62;
2213-
}
2214-
else /* (hclk >= 150000000)&&(hclk <= 200000000) */
2215-
{
2216-
/* CSR Clock Range between 150-200 MHz */
2217-
tmpreg |= ( uint32_t ) ETH_MACMDIOAR_CR_DIV102;
2218-
}
2219-
2220-
/* Configure the CSR Clock Range */
2221-
( heth->Instance )->MACMDIOAR = ( uint32_t ) tmpreg;
2222-
}
2223-
22242174
/**
22252175
* @brief Set the ETH MAC (L2) Filters configuration.
22262176
* @param heth: pointer to a ETH_HandleTypeDef structure that contains

source/portable/NetworkInterface/STM32Hxx/stm32hxx_hal_eth.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,6 @@
18081808
ETH_MACConfigTypeDef * macconf );
18091809
HAL_StatusTypeDef HAL_ETH_SetDMAConfig( ETH_HandleTypeDef * heth,
18101810
ETH_DMAConfigTypeDef * dmaconf );
1811-
void HAL_ETH_SetMDIOClockRange( ETH_HandleTypeDef * heth );
18121811

18131812
/* MAC VLAN Processing APIs ************************************************/
18141813
void HAL_ETH_SetRxVLANIdentifier( ETH_HandleTypeDef * heth,

0 commit comments

Comments
 (0)