Skip to content

Commit f29bb5f

Browse files
committed
stm32cube: stm32h7: eth: Fix calculation of the tail pointer
Cherry-picking commit ceda3ceeca2ee77a76d2de2ee6b560ad87c90a48 in STM32H7 Cube HAL https://github.com/STMicroelectronics/stm32h7xx-hal-driver/ Fixed in hal_stm32 main branch following cube version update from version v1.11.2 to version v1.12.0. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent f131715 commit f29bb5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stm32cube/stm32h7xx/drivers/src/stm32h7xx_hal_eth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth)
12181218
if (heth->RxDescList.RxBuildDescCnt != desccount)
12191219
{
12201220
/* Set the tail pointer index */
1221-
tailidx = (descidx + 1U) % ETH_RX_DESC_CNT;
1221+
tailidx = (ETH_RX_DESC_CNT + descidx + 1U) % ETH_RX_DESC_CNT;
12221222

12231223
/* DMB instruction to avoid race condition */
12241224
__DMB();

0 commit comments

Comments
 (0)