beautypg.com

7 transmit priority, Transmit priority – Maxim Integrated 78Q8430 Software Driver User Manual

Page 36

background image

78Q8430 Software Driver Development Guidelines

UG_8430_004

5.7 Transmit

Priority

The standard transmit procedure uses transmit QUE 4. Frames can also be transmitted at a higher
priority by using QUE 3. Use the following procedure to transmit a frame at a higher priority than the
standard frames:

STEP 1: Write to QUE 3 PCWR.
Writing to this register sets the ID and transmission options for the frame and initializes the write logic
for QUE 3. The driver should assign a unique ID number to each transmitted frame. When the write
logic is initialized, it triggers an under-run interrupt for QUE 3 if the previous frame has not been
completed. This has the effect of aborting the previous frame.

STEP 2: Write to QUE 3 PSZR.
Writing to PSZR indicates to the QUE 3 write logic how many bytes to expect. For example, if the
part is operating in 32-bit bus mode and the byte count is not an even multiple of four, the write logic
uses the size value to determine how many bytes in the last write are valid. If the host attempts to
write an extra word past the end of the programmed size, an overrun interrupt results.

STEP 3: Write the frame data to QUE 3 TDR.
Each successive write to TDR adds the data to QUE 3.

STEP 4: Read the transmit status from TPSR.
Reading TPSR reads status words from the top of a 128 word deep FIFO. One status word is added
to the FIFO for each transmitted frame. If the status words for transmitted frames are not read from
the FIFO, it eventually fills to capacity at which time any new status words are dropped while the
FIFO retains the oldest ones.

36

Rev.

1.0