1 2.这是初始化,可以用, ;--2TH XGATE->RUNNING XGATE SUBROUTINES IN RAM $FC1000 TO $FD1FFF(8K)------------------------* ;-------------initialize the XGATE vector block and------------------------------------------* LDX #XGATE_VECTORS_XG_RAM ;* STX XGVBR ;=$386 set the XGVBR register to its start address ;* ;-------------------------------------------------------------------------------------------;*
; switch ECTCH3_VEC interrupt to XGATE MOVB #(ECTCH3_VEC & $F0), INT_CFADDR MOVB #$80|$01, INT_CFDATA0 + ((ECTCH3_VEC & $0F) >> 1)
; switch ECTCH4_VEC interrupt to XGATE MOVB #(ECTCH4_VEC & $F0), INT_CFADDR MOVB #$80|$01, INT_CFDATA0 + ((ECTCH4_VEC & $0F) >> 1)
; switch PIT0_VEC interrupt to XGATE MOVB #(PIT0_VEC & $F0), INT_CFADDR MOVB #$80|$01, INT_CFDATA0 + ((PIT0_VEC & $0F) >> 1)
; enable XGATE mode and interrupts MOVW #$FBC1, XGMCTL ; XGE | XGFRZ | XGIE
; force execution of software trigger 0 handler ; MOVW #$0101, XGSWT
3.这是向量表
ORG $E08800 LOGICAL
XGATE_VectorTable: ;XGATE 中断向量表,可以放在任意位置。
; Channel_# = Vector address / 2 Channel_00: FDB ErrorHandler, 0 ; Reserved ;FDB 伪指令与DC.W相同。 Channel_01: FDB ErrorHandler, 1 ; Reserved ;FDB 伪指令与DC.W相同。 Channel_02: FDB ErrorHandler, 2 ; Reserved ;FDB 伪指令与DC.W相同。 Channel_03: FDB ErrorHandler, 3 ; Reserved ;FDB 伪指令与DC.W相同。 Channel_04: FDB ErrorHandler, 4 ; Reserved ;FDB 伪指令与DC.W相同。 Channel_05: FDB ErrorHandler, 5 ; Reserved Channel_06: FDB ErrorHandler, 6 ; Reserved Channel_07: FDB ErrorHandler, 7 ; Reserved Channel_08: FDB ErrorHandler, 8 ; Spurious Interrupt Channel_09: FDB ErrorHandler, 9 ; Reserved Channel_0A: FDB ErrorHandler,10 ; Reserved Channel_0B: FDB ErrorHandler,11 ; Reserved Channel_0C: FDB ErrorHandler,12 ; Reserved Channel_0D: FDB ErrorHandler,13 ; Reserved Channel_0E: FDB ErrorHandler,14 ; Reserved Channel_0F: FDB ErrorHandler,15 ; Reserved Channel_10: FDB ErrorHandler,16 ; Reserved Channel_11: FDB ErrorHandler,17 ; Reserved Channel_12: FDB ErrorHandler,18 ; Reserved Channel_13: FDB ErrorHandler,19 ; Reserved Channel_14: FDB ErrorHandler,20 ; Reserved Channel_15: FDB ErrorHandler,21 ; Reserved Channel_16: FDB ErrorHandler,22 ; Reserved Channel_17: FDB ErrorHandler,23 ; Reserved Channel_18: FDB ErrorHandler,24 ; Reserved Channel_19: FDB ErrorHandler,25 ; Reserved Channel_1A: FDB ErrorHandler,26 ; Reserved Channel_1B: FDB ErrorHandler,27 ; Reserved Channel_1C: FDB ErrorHandler,28 ; Reserved Channel_1D: FDB ErrorHandler,29 ; Reserved Channel_1E: FDB ErrorHandler,30 ; Reserved Channel_1F: FDB ErrorHandler,31 ; Reserved Channel_20: FDB ErrorHandler,32 ; Reserved Channel_21: FDB ErrorHandler,33 ; Reserved Channel_22: FDB ErrorHandler,34 ; Reserved Channel_23: FDB ErrorHandler,35 ; Reserved Channel_24: FDB ErrorHandler,36 ; Reserved Channel_25: FDB ErrorHandler,37 ; Reserved Channel_26: FDB ErrorHandler,38 ; Reserved Channel_27: FDB ErrorHandler,39 ; Reserved Channel_28: FDB ErrorHandler,40 ; Reserved Channel_29: FDB ErrorHandler,41 ; Reserved Channel_2A: FDB ErrorHandler,42 ; Reserved Channel_2B: FDB ErrorHandler,43 ; Reserved Channel_2C: FDB ErrorHandler,44 ; Reserved Channel_2D: FDB ErrorHandler,45 ; Reserved Channel_2E: FDB ErrorHandler,46 ; Reserved Channel_2F: FDB ErrorHandler,47 ; Reserved Channel_30: FDB ErrorHandler,48 ; XSRAM20K Access Violation Channel_31: FDB ErrorHandler,49 ; XGATE Software Error Interrupt Channel_32: FDB ErrorHandler,50 ; XGATE Software Trigger 7 Channel_33: FDB ErrorHandler,51 ; XGATE Software Trigger 6 Channel_34: FDB ErrorHandler,52 ; XGATE Software Trigger 5 Channel_35: FDB ErrorHandler,53 ; XGATE Software Trigger 4 Channel_36: FDB ErrorHandler,54 ; XGATE Software Trigger 3 Channel_37: FDB ErrorHandler,55 ; XGATE Software Trigger 2 Channel_38: FDB ErrorHandler,56 ; XGATE Software Trigger 1 Channel_39: FDB SoftwareTrigger0_Handler, 57 ; XGATE Software Trigger 0 Channel_3A: FDB PIT3_VEC_Handler,58 ; Periodic Interrupt Timer 3 Channel_3B: FDB PIT2_VEC_Handler,59 ; Periodic Interrupt Timer 2 Channel_3C: FDB PIT1_VEC_Handler,60 ; Periodic Interrupt Timer 1 Channel_3D: FDB PIT0_VEC_Handler,61 ; Periodic Interrupt Timer 0 Channel_3E: FDB ErrorHandler,62 ; Reserved Channel_3F: FDB ErrorHandler,63 ; Autonomous Periodical interrupt API Channel_40: FDB ErrorHandler,64 ; Low Voltage interrupt LVI Channel_41: FDB ErrorHandler,65 ; IIC1 Bus Channel_42: FDB ErrorHandler,66 ; SCI5 Channel_43: FDB ErrorHandler,67 ; SCI4 Channel_44: FDB ErrorHandler,68 ; SCI3 Channel_45: FDB ErrorHandler,69 ; SCI2 Channel_46: FDB ErrorHandler,60 ; PWM Emergency Shutdown Channel_47: FDB ErrorHandler,71 ; Port P Interrupt Channel_48: FDB ErrorHandler,72 ; CAN4 transmit Channel_49: FDB ErrorHandler,73 ; CAN4 receive Channel_4A: FDB ErrorHandler,74 ; CAN4 errors Channel_4B: FDB ErrorHandler,75 ; CAN4 wake-up Channel_4C: FDB ErrorHandler,76 ; CAN3 transmit Channel_4D: FDB ErrorHandler,77 ; CAN3 receive Channel_4E: FDB ErrorHandler,78 ; CAN3 errors Channel_4F: FDB ErrorHandler,79 ; CAN3 wake-up Channel_50: FDB ErrorHandler,80 ; CAN2 transmit Channel_51: FDB ErrorHandler,81 ; CAN2 receive Channel_52: FDB ErrorHandler,82 ; CAN2 errors Channel_53: FDB ErrorHandler,83 ; CAN2 wake-up Channel_54: FDB ErrorHandler,84 ; CAN1 transmit Channel_55: FDB ErrorHandler,85 ; CAN1 receive Channel_56: FDB ErrorHandler,86 ; CAN1 errors Channel_57: FDB ErrorHandler,87 ; CAN1 wake-up Channel_58: FDB ErrorHandler,88 ; CAN0 transmit Channel_59: FDB ErrorHandler,89 ; CAN0 receive Channel_5A: FDB ErrorHandler,90 ; CAN0 errors Channel_5B: FDB ErrorHandler,91 ; CAN0 wake-up Channel_5C: FDB ErrorHandler,92 ; FLASH Channel_5D: FDB ErrorHandler,93 ; EEPROM Channel_5E: FDB ErrorHandler,94 ; SPI2 Channel_5F: FDB ErrorHandler,95 ; SPI1 Channel_60: FDB ErrorHandler,96 ; IIC0 Bus Channel_61: FDB ErrorHandler,97 ; Reserved Channel_62: FDB ErrorHandler,98 ; CRG Self Clock Mode Channel_63: FDB ErrorHandler,99 ; CRG PLL lock Channel_64: FDB PBOF_VEC_Handler,100 ; Pulse Accumulator B Overflow Channel_65: FDB ErrorHandler,101 ; Modulus Down Counter underflow Channel_66: FDB ErrorHandler,102 ; Port H Channel_67: FDB ErrorHandler,103 ; Port J Channel_68: FDB AD1_VEC_Handler, 104 ; ATD1 Channel_69: FDB AD0_VEC_Handler, 105 ; ATD0 Channel_6A: FDB ErrorHandler,106 ; SCI1 Channel_6B: FDB SCI0_VEC_Handler,107 ; SCI0 Channel_6C: FDB ErrorHandler,108 ; SPI0 Channel_6D: FDB ErrorHandler,109 ; Pulse accumulator input edge Channel_6E: FDB PAOF_VEC_Handler,110 ; Pulse accumulator A overflow Channel_6F: FDB ECTOF_VEC_Handler,111 ; Enhanced Capture Timer overflow Channel_70: FDB ECTCH7_VEC_Handler,112 ; Enhanced Capture Timer channel 7 Channel_71: FDB ECTCH6_VEC_Handler,113 ; Enhanced Capture Timer channel 6 Channel_72: FDB ECTCH5_VEC_Handler,114 ; Enhanced Capture Timer channel 5 Channel_73: FDB ECTCH4_VEC_Handler,115 ; Enhanced Capture Timer channel 4 Channel_74: FDB ECTCH3_VEC_Handler,116 ; Enhanced Capture Timer channel 3 Channel_75: FDB ECTCH2_VEC_Handler,117 ; Enhanced Capture Timer channel 2 Channel_76: FDB ECTCH1_VEC_Handler,118 ; Enhanced Capture Timer channel 1 Channel_77: FDB ECTCH0_VEC_Handler,119 ; Enhanced Capture Timer channel 0 Channel_78: FDB ErrorHandler,120 ; Real Time Interrupt Channel_79: FDB ErrorHandler,121 ; Reserved Channel_7A: FDB ErrorHandler,122 ; Reserved Channel_7B: FDB ErrorHandler,123 ; Reserved Channel_7C: FDB ErrorHandler,124 ; Reserved Channel_7D: FDB ErrorHandler,125 ; Reserved Channel_7E: FDB ErrorHandler,126 ; Reserved Channel_7F: FDB ErrorHandler,127 ; Reserved
|