2019-11-20 05: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.
2019-11-28 04:31 AM
Where is the place to report bugs in CubeMX and CubeIDE?
2019-11-28 05:07 AM
No Github repository for STM32CubeMX & STM32CubeIDE.
Use following Community spaces to report bugs:
-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.
2019-11-28 10:40 AM
@AAshc Thank you for finding this bug.
2020-02-02 01: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...
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.