Inconsistent ethernet RX descriptor queue when using context descriptor
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
