Download Freescale Semiconductor Microcontrollers User's Manual

Transcript
HC08 Full Chip Simulation
Configuration Procedure
rti
**************************************************************
* USB_SYS_ISR - USB System Interrupt Service Routine.
*
*
Interrupts here if USB suspend, resume, reset,
*
*
config_chg, start of frame, or setup event
*
*
occurs.
*
**************************************************************
USB_SYS_ISR:
brclr 2,USBSR,USB_SYS_ISR2
; Is it USB reset?
bclr 2,USBSR
; reset USB reset flag
rti
; exit interrupt
USB_SYS_ISR2:
brclr 3,USBSR,USB_SYS_ISR3
brclr
lda
sta
mov
bclr
bset
bclr
rti
; Is there a change in
; configuration?
7,USBSR,USB_CONFIG_CLR
ptb
; get Port B value
EP1BuffStart
; place in endpoint 1 data buffer
#01,UEP1DSR
; set data size for endpoint 1 to 1
0,UEP1CSR
; clear the TFRC flag
1,UEP1CSR
; set the DVALID flag
3,USBSR
; clear the CONFIG_CHG flag
; exit interrupt
USB_CONFIG_CLR:
bclr 3,USBSR
rti
USB_SYS_ISR3:
brclr 5,USBSR,USB_SYS_ISR4
jsr
SETUP_PROC
rti
USB_SYS_ISR4:
brclr 0,USBSR,USB_SYS_EXIT
bclr 0,USBSR
rti
; clear CONFIG_CHG bit
; exit interrupt
; is it SETUP packet?
; handle SETUP packet
; exit interrupt
; is it a SUSPEND event?
; reset suspend flag
; exit interrupt
USB_SYS_EXIT:
rti
**************************************************************
* DUMMY_ISR - Dummy Interrupt Service Routine.
*
*
Just does a return from interrupt.
*
**************************************************************
DUMMY_ISR:
rti
; simple return
**************************************************************
Microcontrollers Debugger Manual
319