Skip to main content
Visitor II
May 14, 2019
Solved

Inconsistent ethernet RX descriptor queue when using context descriptor

  • May 14, 2019
  • 4 replies
  • 1801 views

The following bug occurs in the stm32h7xx_hal_eth library:

When a feature of the ehernet peripheral is enabled which causes the DMA to use RX context descriptors, for example the ieee1588 timestamping unit, this leads to an inconsistent state of the RX descriptor list.

I discovered that this is caused by the HAL_ETH_BuildRxDescriptors function which does not clear the own bit of the context descriptor and does not reset the context descriptor in the descriptor list.

The following changes solve the problem:

line 1159

if(descscan < (dmarxdesclist->AppDescNbr -1))

needs to be replaced by

if(descscan < (totalappdescnbr - 1))

The line

WRITE_REG(dmarxdesclist->AppContextDesc, 0);

needs to be added before the return statement.

Cheers, Jan

    This topic has been closed for replies.
    Best answer by JLehm

    I did not test it, but i had a look at the HAL_ETH_BuildRxDescriptors function in version 1.4.0 and i don't see any changes there. So i guess the bug is not fixed yet.

    4 replies

    Technical Moderator
    May 22, 2019

    Hello,

    Could you please precise in which version of STM32CubeH7 you have found this issue. So, we can verify it.

    Regards,

    Imen

    JLehmAuthor
    Visitor II
    May 22, 2019

    Unfortunately we are not able to reliably reconstruct this information, but we are 90% certain that it was STM32Cube H7 V1.3.0.

    Technical Moderator
    May 22, 2019

    Can you please confirm if that problem is still being faced with the latest version of firmware package STM32CubeH7 v1.4.0 ?

    JLehmAuthorAnswer
    Visitor II
    May 22, 2019

    I did not test it, but i had a look at the HAL_ETH_BuildRxDescriptors function in version 1.4.0 and i don't see any changes there. So i guess the bug is not fixed yet.

    Technical Moderator
    May 22, 2019

    Ok, thanks for your reply. We will check this issue internally and come back to you soon with update.