Hello!
May be it is wrong ethernet DMA tail calculation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-20 5:26 AM
In ethernet HAL driver stm32h7xx_hal_eth.c function void ETH_DMARxDescListInit include row: " WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (((uint32_t)(ETH_RX_DESC_CNT - 1))*sizeof(ETH_DMADescTypeDef)))));"
This code adding value to heth->Init.RxDesc. But, RxDesc is pointer to 32bit and added shift is multiplicated for 4.
Correct row must be:
" WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc) + ((uint32_t)(ETH_RX_DESC_CNT - 1))*sizeof(ETH_DMADescTypeDef)));"
Solved! Go to Solution.
- Labels:
-
Bug-report
-
Ethernet
-
Github
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-28 4:31 AM
Where is the place to report bugs in CubeMX and CubeIDE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-28 5:07 AM
No Github repository for STM32CubeMX & STM32CubeIDE.
Use following Community spaces to report bugs:
- STM32CubeMX: https://community.st.com/s/topic/0TO0X000000BTr8WAG/stm32cubemx
- STM32CubeIDE: https://community.st.com/s/topic/0TO0X000000y2j7WAA/stm32cubeide
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-11-28 10:40 AM
@AAshc Thank you for finding this bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-02-02 1:58 AM
By the way, here is the respective code line from H7 HAL v1.3.0:
WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)heth->Init.RxDesc + ((ETH_RX_DESC_CNT - 1)*sizeof(ETH_DMADescTypeDef))));
It's essentially the same as the OP's version. It relied on C operator precedence, but it was correct! Until some brainless code monkey "fixed" it by adding braces in wrong places...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-09 11:08 PM
I'm just changing my non-HAL ethernet driver from F7 to H7 - oh my, it is so different.
At start, why not set the tail pointer directly to the last descriptor's address?
ETH->DMACRDTPR = (uint32_t)&DMARxDscrTab[ETH_RX_DESC_CNT - 1];
But maybe I have not yet fully understood the tail pointer.
Thankfully I found this thread with @alister 's explanation.

- « Previous
-
- 1
- 2
- Next »