Question when setting up the ETH Receive Descriptor Tail pointer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-17 1:27 AM
Hello there!
I'm reading the STM32H5 documentation on how to setup the ETH descriptors correctly. At the same time I'm following the HAL for the same H5 series.
When the RX descriptors are initialized, I can see the HAL assumes there are 4 descriptors.
/* Set Receive Descriptor Ring Length */
WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U)));
/* Set Receive Descriptor List Address */
WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc);
/* Set Receive Descriptor Tail pointer Address */
WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t) &heth->Init.RxDesc[ETH_RX_DESC_CNT - 1]));
static ETH_DMADescTypeDef dma_rx_dscr_tab[ETH_RX_DESC_CNT];
/* Provides the address of the first DMA Rx descriptor in the list */
heth.Init.RxDesc = dma_rx_dscr_tab;
My question is regarding the address of the tail pointer.
WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1U))));
WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t) &heth->Init.RxDesc[ETH_RX_DESC_CNT - 1]));
Solved! Go to Solution.
- Labels:
-
DMA
-
STM32H5 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-17 4:07 AM
We just had a similar thread for H7, here it is:
https://community.st.com/t5/stm32-mcus-products/stm32h723-ethernet-dma-tail-pointer/td-p/695790
And here's some interesting info, including some further links:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-17 4:07 AM
We just had a similar thread for H7, here it is:
https://community.st.com/t5/stm32-mcus-products/stm32h723-ethernet-dma-tail-pointer/td-p/695790
And here's some interesting info, including some further links:
