Motorola MC68302 User Manual page 366

Integrated multiprotocol processor
Hide thumbs Also See for MC68302:
Table of Contents

Advertisement

MC68302 Applications
CMPI.W
BNE.B
* The handling of other events, e.g., CTS, CD IDL, BSY, is left
* the users as desired.
OthrlNT
MOVE.W #$2000,1SR
RTE
***************Receiver portion of SCC1 interrupt routine****************
* This routine handles received (nonempty) BD: set data length = 0,
* clear status bits, set empty =1, and update PRD
* Clear the identified events as soon as possible, so no lost
* events occur during the interrupt handling
RX_INT
MOVE.B
* While Not-Empty continue to process the next Rx BD, Else Exit.
NxtPRD
BTST.B
*
BNE.B
*
*** Check status in RXBD for erratic events ***
* If status bits are all 0 then continue, else SHUTDOWN the receiving
* process. This in turn shuts down the whole program, since all of
* Rx BDs will soon be unavailable (all BDs Empty = 8). Thus, the
* status of this BD will be saved for examination later.
CMPI.B
BNE.B
* Status bits are all 0
CLR.W
CLR.B
BSET.B
BTST.B
BNE.B
ADDQ.W
BRA.B
Wrap_R
LEA.L
BRA.B
EXIT_RX
JMP
***************Conflrmer portion of SCC1 Interrupt routine ***************
* This routine handles transmitted (Not-ready) BD: set data length = 0,
* clear status bits, set ready = 1, and update CTD.
* Same as the Rx Interrupt handler, the first thing to do is to
* clear the identified events
TX_INT
MOVE.B
* While Not-Ready continue to process the next Rx BD, Else Exit.
* The Ready bit should be cleared by the CP
NxtCTD
BTST.B
BNE.B
*
* Check data length, length must be > 0 to continue the confirming process
CMPI.W
BEQ.B
CLR.W
***Check status in TXBD for erratic events ***
* If status bits are all 0 then continue, else SHUTDOWN the confirming
* process. This in turn shuts down the whole program, since soon
D-16
#0,D2
TX_ INT
#9,SCCE1
#EMPTY,ST_BD(A3)
EXIT_RX
#0,SS_BD(A3)
EXIT_RX
LN_BD(A3)
SS_BD(A3)
#EMPTY,ST_BD(A3)
#WRAP,ST_BD(A3)
Wrap_R
#SZ_BD,A3
NxtPRD
RXBD_01,A3
NxtPRD
CK_TX
#$1 2,SCCE1
#READY,ST BD(A1)
EXIT_TX
#0,LN_BD(A1)
EXIT_TX
LN_BD(A1)
MC68302 USER'S MANUAL
;If they are set
;Handle Transmitter's interrupt
;Clear SCC1 bit in ISR
;Clear RXF and RXB in SCCE1
;Test PRD -, Empty Bit
;Don't need to process if the
;Rx BD is still empty.
;Check status bits
;data length = 0
;Clear out all status bits
;Empty = 1
;Test Wrap bit
;Increment PRD to next BD
;Back to while loop
;Wrap back to the first Rx BD
;Back to the while loop
;Exit receiver potion of the handler
;Clear TXF and TXB in SCCE1
;Test PRD-> Ready Bit
;Don't need to process if the
;Tx BD is Ready.
;Test CTD –> data length
;data length = 0
to
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents