15.3.3.6.2 TX DMA OSF Mode Operation
While in the RUN state, the transmit process can simultaneously acquire two frames without closing the Status descriptor of the first if the OSF bit of the EMACDMAOPMODE register is set. As the transmit process finishes transferring the first frame, it immediately polls the transmit descriptor list for the second frame. If the second frame is valid, the transmit process transfers this frame before writing the first frame's status information.
In Operate on Second Frame (OSF) mode, the RUN state TX DMA operates in the following sequence:
- The DMA operates as described in Step 1 to Step 6 of Section 15.3.3.6.1.
- Without closing the previous frame's last descriptor, the DMA fetches the next descriptor.
- If the DMA owns the acquired descriptor, the DMA decodes the transmit buffer address in this descriptor. If the DMA does not own the descriptor, the DMA goes into SUSPEND mode and skips to Step 7.
- The DMA fetches the Transmit frame from system memory and transfers the frame until the end-of-frame data is reached. It closes the intermediate descriptors if this frame is split across multiple descriptors.
- The DMA waits for the previous frame's transmission status and timestamp. When the status is available, the DMA writes the timestamp to TDES6 and TDES7, if such timestamp was captured (as indicated by a status bit). The DMA then writes the status, with a cleared OWN bit, to the corresponding TDES0, thus closing the descriptor. If timestamping was not enabled for the previous frame, the DMA does not alter the contents of TDES6 and TDES7.
- If enabled, the Transmit interrupt (TI) bit is set in the EMACDMARIS register, the DMA fetches the next descriptor and then proceeds to Step 3 (when Status is normal). If the previous transmission status shows an underflow error, the DMA goes into SUSPEND mode
- In SUSPEND mode, if a pending status and timestamp are received, the DMA writes the timestamp (if enabled for the current frame) to TDES6 and TDES7, then writes the status to the corresponding TDES0. It then sets relevant interrupts and returns to SUSPEND mode.
- The DMA can exit SUSPEND mode and enter the RUN state only after receiving the Transmit Poll demand in the EMACTXPOLLD register.
NOTE
The DMA fetches the next descriptor in advance before closing the current descriptor. Therefore, the descriptor chain should have more than two different descriptors for correct and proper operation.
Figure 15-8 shows the flow for the TX DMA Operate-On-Second-Frame (OSF) operation.