In FEC of i.MX25, would you tell me about a method to check that data transfer was completed?
We refer to the following point of the reference manual.
188.8.131.52 Driver/DMA Operation with Buffer Descriptors (P.850)
"After the data DMA is complete and the buffer descriptor status bits have been
written by the DMA engine, the RxBD[E] or TxBD[R] bit is cleared by hardware to
signal the buffer has been “consumed.” Software can poll the BDs to detect
when the buffers have been consumed or can rely on the buffer/frame interrupts."
According to this, we understand there is two methods to check the data transfer of FEC was completed.
A) SW polls it until TxBD[R] is cleared.
B) SW relies on the buffer/frame(EIR[TXF]) interrupts.
The frame may be constructed in a number of Buffers.
However, in the Linux BSP_FEC driver of NXP, one frame is constructed by one buffer.
static status_t xio_write( XCONTAINER* x_contnr, void*buffer, size_t length )
status_t WriteFrame( CTB_LAN* control, void* buffer, size_tlength )
static status_t SendBuf( CTB_LAN* control, void* data, size_tsize )
We used a method of (A).
However, we were not able to detect transfer completion correctly.
When a method of (B) is used, it seems that we are able to detect transfer completion correctly.
We do not understand difference between (A) and (B).
We want to know the reason that we cannot detect correctly by (A).
May I have advice?