cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistent ethernet RX descriptor queue when using context descriptor

JLehm
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
JLehm
Associate II

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.

View solution in original post

7 REPLIES 7
Imen.D
ST Employee

Hello,

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

Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
JLehm
Associate II

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

Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
JLehm
Associate II

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.

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello,

Sorry for the delay to answer on this request.

The fix is integrated and it will be available in coming release of STM32CubeH7 V1.8.0

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Wow, those two small code lines took only one year and four STM32CubeH7 releases... ;)