10 fcc interrupt handling, 1 fcc transmit errors, 1 re-initialization procedure – Freescale Semiconductor MPC8260 User Manual

Page 914: Fcc interrupt handling -16, Fcc transmit errors -16, Re-initialization procedure -16

Advertising
background image

Fast Communications Controllers (FCCs)

MPC8260 PowerQUICC II Family Reference Manual, Rev. 2

29-16

Freescale Semiconductor

The first RxBD’s empty bit must be set before the

INIT

RX

COMMAND

. However TxBDs can have their

ready bits set at any time. Notice that the CPCR does not need to be accessed after a power-on reset until
an FCC is to be used. An FCC should be disabled and reenabled after any dynamic change in its parallel
I/O ports or serial channel physical interface configuration. A full reset using CPCR[RST] is a
comprehensive reset that also can be used.

29.10 FCC Interrupt Handling

The following describes what usually occurs within an FCC interrupt handler:

1. When an interrupt occurs, read FCCE to determine interrupt sources. FCCE bits to be handled in

this interrupt handler are normally cleared at this time.

2. Process the TxBDs to reuse them if the FCCE[TX,TXE] were set. If the transmit speed is fast or

the interrupt delay is long, more than one transmit buffer may have been sent by the FCC. Thus, it
is important to check more than just one TxBD during the interrupt handler. One common practice
is to process all TxBDs in the interrupt handler until one is found with R set.

3. Extract data from the RxBD if FCCE[RX, RXB, or RXF] is set. If the receive speed is fast or the

interrupt delay is long, the FCC may have received more than one receive buffer. Thus, it is
important to check more than just one RxBD during interrupt handling. Typically, all RxBDs in the
interrupt handler are processed until one is found with E set. Because the FCC prefetches BDs, the
BD table must be big enough such that always there will be another empty BD to prefetch.

4. Clear FCCE.

5. Continue normal execution.

29.10.1 FCC Transmit Errors

There are four errors in the FCC transmitter that make it necessary for software to act on the transmitter
before correct operation can continue. The errors are as follows:

CTS-lost indication in HDLC transmitter (use re-initialization procedure)

Underrun in any of the serial FCC transmitter protocols (use re-initialization procedure)

Late collision in fast Ethernet transmitter (use recovery or re-initialization procedure)

Expiration of retry limit in fast Ethernet (use recovery or re-initialization procedure)

In addition to status bits in the current TxBD, these errors are reported via the TXE event bit in the FCCE
as a convenience for the user to implement error handling. TXE is a safe indication that a recovery or
re-initialization procedure must be started.

29.10.1.1 Re-Initialization Procedure

1. Disable the FCC transmission by clearing GFMR[ENT].

2. Remember the TBPTR value taken from the FCC parameter RAM.

3. Issue a “RESTART TX” command using the CPCR.

4. Restore the remembered TBPTR into the FCC parameter RAM.

5. Adjust TxBD handling as described in Section 28.10.1.3.

Advertising