The following error report is for all reference manuals of H7 with ETH peripheral:
- RM0399 Rev 3 section 61.10.2
- RM0433 Rev 7 section 58.10.2
- RM0468 Rev 3 section 63.10.2
According to the information from others and common sense, the following bold formatted sentences in the respective sections are wrong and misleading:
---------
The Channel Tx descriptor tail pointer register (ETH_DMACTXDTPR) or Channel Rx descriptor tail pointer register (ETH_DMACRXDTPR) contains the pointer to the descriptor address (N). The base address and the current descriptor pointer decide the address of the current descriptor that the DMA can process. The descriptors up to one location less than the one indicated by the descriptor tail pointer (N – 1) are owned by the DMA. The DMA continues to process the descriptors until the following condition occurs:
Current Descriptor Pointer == Descriptor Tail Pointer;
The DMA enters the Suspend state when this condition occurs. The application must perform a write operation to the Descriptor tail pointer register and update the tail pointer so that the following condition is met:
Current Descriptor Pointer < Descriptor Tail Pointer;
---------
Descriptor tail pointer registers doesn't somehow magically "contain" some values and address of the descriptor N is not the best value for initialization also. Typically the best will be N+1 or anything that effectively disables stopping on tail pointer match. It is safe because even, if the DMA will fill all of the descriptors before those are processed by application and wrap around, it will still enter the suspended state, because the OWN bit on the descriptor 0 will still be cleared. Therefore the tail pointer does not determine the ownership of descriptors and the text is misleading. And relational operator "<" is not the logical opposite of "==". The "!=" is, which includes also the ">" case. Common sense and point 4 in Alister's detailed comment above tells that hardware just stops processing descriptors, if the tail pointer equals current descriptor address, and doesn't do "less than" comparison, because otherwise the feature would be practically useless.
And there is another tail pointer related misinformation in register descriptions:
---------
Channel Tx descriptor tail pointer register (ETH_DMACTXDTPR)
The ChannelTx Descriptor Tail Pointer register points to an offset from the base and indicates the location of the last valid descriptor.
Channel Rx descriptor tail pointer register (ETH_DMACRXDTPR)
The Channel Rx Descriptor Tail Pointer Points to an offset from the base and indicates the location of the last valid descriptor.
---------
Besides the missing space in "ChannelTx", missing word "register" for Rx and an unnecessary capital letter in "Points", the information says those registers hold the offset from the descriptor list base address. Again an information from others and even the HAL ETH driver on the contrary shows that those registers hold the absolute address of the tail pointer.
And one more thing. Contrary to the reference manuals, CMSIS header files name ETH registers (not only these two) without the "X" letter (formatted as bold in the above example) in the names. One or the other must be corrected.
Other topics confirming the presented information:
https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet
https://community.st.com/s/question/0D53W000003vOM1SAM/stm32h7-ethernet-please-help-to-review-rx-descriptor-init-fix
https://community.st.com/s/question/0D50X0000AU4PuySQF/ethernet-receive-stability-using-tcp
@Imen DAHMEN, this information should be confirmed and the reference manuals corrected.