STMicroelectronics / STM32CubeH7

STM32Cube MCU Full Package for the STM32H7 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
https://www.st.com/en/embedded-software/stm32cubeh7.html
Other
490 stars 302 forks source link

DOC and API have a bug in describing STM32H7 ETH->DMACTDRLR (ETH_DMACTXRLR) register #198

Closed usaguerrilla closed 2 years ago

usaguerrilla commented 2 years ago

Caution The Issues are strictly limited for the reporting of problem encountered with the software provided in this project. For any other problem related to the STM32 product, the performance, the hardware characteristics and boards, the tools the environment in general, please post a topic in the ST Community/STM32 MCUs forum

Describe the set-up

Describe the bug A clear and concise description of what the bug is.

post in the forum about this issue: https://community.st.com/s/question/0D53W00001JCPy0SAH/eth-transmit-ring-buffer-doesnt-wrap-around-stm32h745zi

STM32H745ZI

code comment states:
ETH_DMACTDRLR_TDRL_Msk   /* Transmit Descriptor Ring Length */

documentation states:
TDRL[9:0]: Transmit Descriptor Ring Length
This field sets the maximum number of Tx descriptors in the circular descriptor ring. The
maximum number of descriptors is limited to 1K descriptors. It is recommended to put a
minimum ring descriptor length of 4.

both are wrong. You actually need to write RING_BUFFER_SIZE - 1 (minus one) in order for buffer to work properly.

I set value to 5 and buffer never wraps around when I send 6th item. Then I set it to 4 and it sends 5 items normally and then wraps around on 6th item. so buffer size is 5 but you need to write 4 into the register.

How To Reproduce

  1. Indicate the global behavior of your application project

  2. The modules that you suspect to be the cause of the problem (Driver, BSP, MW ...)

  3. The use case that generates the problem

  4. How we can reproduce the problem

Additional context If you have a first analysis or patch correction, thank you to share your proposal.

Screenshots If applicable, add screenshots to help explain your problem.

ASELSTM commented 2 years ago

Hi @usaguerrilla,

Thank you for your contribution. The point you reported has been already treated at ST Community. An internal bug tracker has been logged and it will be treated by our development team.

As the issue is already treated at the ST Community, please allow me then to close this thread to avoid issues duplications. Thank you for your comprehension.

With regards,