Skip to content

Commit 5837af2

Browse files
committed
stm32cube: stm32h5: eth: Fix calculation of the tail pointer
Fixed in hal_stm32 main branch following cube version update from version v1.3.0 to version v1.4.0. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent be6ebe8 commit 5837af2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stm32cube/stm32h5xx/drivers/src/stm32h5xx_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)