I am looking at the EMACMSP432E4_handleRx() found in EMACMSP432E4.c.
at line 409, for unvalid frames, pDescList->ulRead is incremented
EMACMSP432E4_private.rxDropped++; EMACMSP432E4_primeRx(hPkt, &(pDescList->pDescriptors[pDescList->ulRead])); -> pDescList->ulRead++; break; }
whitout taking care to wrap.
At line 456, for valid frames, pDescList->ulRead is incremented as follow:
/* Move on to the next descriptor in the chain, taking care to wrap. */ pDescList->ulRead++; if (pDescList->ulRead == pDescList->ulNumDescs) { pDescList->ulRead = 0; }
Can someone explain why?
Regards