stm32f4xx_hal_driver icon indicating copy to clipboard operation
stm32f4xx_hal_driver copied to clipboard

ETH: HAL_ETH_ReleaseTxPacket Does Not Increment Descriptor Index Correctly in All Cases

Open Jeremin opened this issue 3 years ago • 2 comments

Describe the set-up

  • STM32F427
  • arm-none-eabi-gcc.exe (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)
  • HAL V1.8.0

Describe the bug (skip if none)

Issue with Src/stm32f4xx_hal_eth.c, function HAL_ETH_ReleaseTxPacket. There are two occasions (line 1459 and 1497 on 1d99564fee7e2d766efc94d3811ca4ec6389036c) where the assumption is made that ETH_TX_DESC_CNT is a power of two. Can be fixed by using the INCR_TX_DESC_INDEX(idx, 1U); macro in both cases.

How to reproduce the bug (skip if none) Set ETH_TX_DESC_CNT to e.g. 5.

Jeremin avatar Jun 02 '22 08:06 Jeremin

Hi @Jeremin,

The ETH_TX_DESC_CNT could actually take any value up to 0x3FF, there is no constraint on whether it should be power of two or not. Nevertheless, the update you have proposed is relevant, it will be implemented.

With regards,

ASELSTM avatar Apr 14 '23 14:04 ASELSTM

ST Internal Reference: 149832

ASELSTM avatar Apr 14 '23 14:04 ASELSTM

Hello,

I hope you are fine. The issue you reported has been fixed in the frame of version v1.28.1 of the STM32CubeF4 published recently on GitHub. Thank you again for having reported.

Regards,

RJMSTM avatar Jun 20 '24 10:06 RJMSTM