Skip to content

Commit

Permalink
stm32h7: fix TX timestamp check
Browse files Browse the repository at this point in the history
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é <benjamin@zephyrproject.org>
  • Loading branch information
kartben committed Jun 27, 2024
1 parent 855f195 commit d130d89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stm32cube/stm32f7xx/drivers/src/stm32f7xx_hal_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d130d89

Please sign in to comment.