From d130d89338c046ab6d93a7adaf1e3a3f9b671ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Thu, 27 Jun 2024 17:04:25 +0200 Subject: [PATCH] stm32h7: fix TX timestamp check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It looks like the original code was a bad copy-paste from H5/H7 HALs. ETH_DMATXDESC_LS and ETH_DMATXDESC_TTSS are flags from the DuESC0 register. This fix allows to effectively set the TX timestamp properly when there is one. Signed-off-by: Benjamin Cabé --- stm32cube/stm32f7xx/drivers/src/stm32f7xx_hal_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stm32cube/stm32f7xx/drivers/src/stm32f7xx_hal_eth.c b/stm32cube/stm32f7xx/drivers/src/stm32f7xx_hal_eth.c index 77d6f84e6..3994e5b54 100644 --- a/stm32cube/stm32f7xx/drivers/src/stm32f7xx_hal_eth.c +++ b/stm32cube/stm32f7xx/drivers/src/stm32f7xx_hal_eth.c @@ -1472,8 +1472,8 @@ HAL_StatusTypeDef HAL_ETH_ReleaseTxPacket(ETH_HandleTypeDef *heth) if ((heth->Init.TxDesc[idx].DESC0 & ETH_DMATXDESC_OWN) == 0U) { #ifdef HAL_ETH_USE_PTP - if ((heth->Init.TxDesc[idx].DESC3 & ETH_DMATXDESC_LS) - && (heth->Init.TxDesc[idx].DESC3 & ETH_DMATXDESC_TTSS)) + if ((heth->Init.TxDesc[idx].DESC0 & ETH_DMATXDESC_LS) + && (heth->Init.TxDesc[idx].DESC0 & ETH_DMATXDESC_TTSS)) { /* Get timestamp low */ timestamp->TimeStampLow = heth->Init.TxDesc[idx].DESC6;