This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Understanding RX Descriptors in EMAC driver

I am playing around with the tm4c1294 launchpad. I have setup a 2d buffer array. Let's say 9 rxbuffers each 1536 bytes long (I got this number from one of the example projects). Am I correct in assuming that when a RX packet is received, assuming the DMA controller has access to one of my allocated buffers through its network descriptor, that the raw packet, preamble and all are copied into that array buffer?

In order to figure out the total length of the received packet, you would use a function call similar to this correct?

 

tempLength = ((RxDescriptorCopy[currentRxDescriptor].ui32CtrlStatus &
									DES0_RX_STAT_FRAME_LENGTH_M) >>
									DES0_RX_STAT_FRAME_LENGTH_S);

  • Hello Jeff,

    According to the datasheet, MAC strips the preamble, start-of-frame (SFD) and carrier extension of the Ethernet frame. Based on the software configuration, the MAC can also strip the CRC bits. Please refer the section "MAC Operation" under "Ethernet Controller" chapter of the datasheet.

    A function like what you mentioned gives the number of bytes for the received frame, provided that the buffers pointed by this descriptor are the last buffers of the frame (denoted when the "Last Descriptor" bit is set) and there are no error reported by "Descriptor Error" and "Overflow Error" bits.

    If the "Last Descriptor" bit is clear and the "Error Summary" bit is also clear, then the function (posted above) will return the accumulate number of bytes transferred for the current frame. Please refer the datasheet for more details.

    Thanks,
    Sai