📄 psocconfigtbl.lis
字号:
0000
0000 ;----------------------------------------------------
0000 ; Swapping Register Banks
0000 ;----------------------------------------------------
0000 macro M8C_SetBank0
0000 and F, ~FLAG_XIO_MASK
0000 macro M8C_SetBank1
0000 or F, FLAG_XIO_MASK
0000 macro M8C_EnableGInt
0000 or F, FLAG_GLOBAL_IE
0000 macro M8C_DisableGInt
0000 and F, ~FLAG_GLOBAL_IE
0000 macro M8C_DisableIntMask
0000 and reg[@0], ~@1 ; disable specified interrupt enable bit
0000 macro M8C_EnableIntMask
0000 or reg[@0], @1 ; enable specified interrupt enable bit
0000 macro M8C_ClearIntFlag
0000 mov reg[@0], ~@1 ; clear specified interrupt enable bit
0000 macro M8C_EnableWatchDog
0000 and reg[CPU_SCR0], ~CPU_SCR0_PORS_MASK
0000 macro M8C_ClearWDT
0000 mov reg[RES_WDT], 00h
0000 macro M8C_ClearWDTAndSleep
0000 mov reg[RES_WDT], 38h
0000 macro M8C_Stall
0000 or reg[ASY_CR], ASY_CR_SYNCEN
0000 macro M8C_Unstall
0000 and reg[ASY_CR], ~ASY_CR_SYNCEN
0000 macro M8C_Sleep
0000 or reg[CPU_SCR0], CPU_SCR0_SLEEP_MASK
0000 ; The next instruction to be executed depends on the state of the
0000 ; various interrupt enable bits. If some interrupts are enabled
0000 ; and the global interrupts are disabled, the next instruction will
0000 ; be the one that follows the invocation of this macro. If global
0000 ; interrupts are also enabled then the next instruction will be
0000 ; from the interrupt vector table. If no interrupts are enabled
0000 ; then the CPU sleeps forever.
0000 macro M8C_Stop
0000 ; In general, you probably don't want to do this, but here's how:
0000 or reg[CPU_SCR0], CPU_SCR0_STOP_MASK
0000 ; Next instruction to be executed is located in the interrupt
0000 ; vector table entry for Power-On Reset.
0000 macro M8C_Reset
0000 ; Restore CPU to the power-on reset state.
0000 mov A, 0
0000 SSC
0000 ; Next non-supervisor instruction will be at interrupt vector 0.
0000 macro Suspend_CodeCompressor
0000 or F, 0
0000 macro Resume_CodeCompressor
0000 add SP, 0
export LoadConfigTBL_usb
AREA psoc_config(rom, rel)
0000 LoadConfigTBL_usb:
0000 ; Ordered Global Register values
0000 7110 or F, FLAG_XIO_MASK
0002 620000 mov reg[00h], 00h ; Port_0_DriveMode_0 register (PRT0DM0)
0005 6201FF mov reg[01h], ffh ; Port_0_DriveMode_1 register (PRT0DM1)
0008 70EF and F, ~FLAG_XIO_MASK
000A 6203FF mov reg[03h], ffh ; Port_0_DriveMode_2 register (PRT0DM2)
000D 620200 mov reg[02h], 00h ; Port_0_GlobalSelect register (PRT0GS)
0010 7110 or F, FLAG_XIO_MASK
0012 620200 mov reg[02h], 00h ; Port_0_IntCtrl_0 register (PRT0IC0)
0015 620300 mov reg[03h], 00h ; Port_0_IntCtrl_1 register (PRT0IC1)
0018 70EF and F, ~FLAG_XIO_MASK
001A 620100 mov reg[01h], 00h ; Port_0_IntEn register (PRT0IE)
001D 7110 or F, FLAG_XIO_MASK
001F 620400 mov reg[04h], 00h ; Port_1_DriveMode_0 register (PRT1DM0)
0022 6205FF mov reg[05h], ffh ; Port_1_DriveMode_1 register (PRT1DM1)
0025 70EF and F, ~FLAG_XIO_MASK
0027 6207FF mov reg[07h], ffh ; Port_1_DriveMode_2 register (PRT1DM2)
002A 620600 mov reg[06h], 00h ; Port_1_GlobalSelect register (PRT1GS)
002D 7110 or F, FLAG_XIO_MASK
002F 620600 mov reg[06h], 00h ; Port_1_IntCtrl_0 register (PRT1IC0)
0032 620700 mov reg[07h], 00h ; Port_1_IntCtrl_1 register (PRT1IC1)
0035 70EF and F, ~FLAG_XIO_MASK
0037 620500 mov reg[05h], 00h ; Port_1_IntEn register (PRT1IE)
003A 7110 or F, FLAG_XIO_MASK
003C 620800 mov reg[08h], 00h ; Port_2_DriveMode_0 register (PRT2DM0)
003F 6209FF mov reg[09h], ffh ; Port_2_DriveMode_1 register (PRT2DM1)
0042 70EF and F, ~FLAG_XIO_MASK
0044 620BFF mov reg[0bh], ffh ; Port_2_DriveMode_2 register (PRT2DM2)
0047 620A00 mov reg[0ah], 00h ; Port_2_GlobalSelect register (PRT2GS)
004A 7110 or F, FLAG_XIO_MASK
004C 620A00 mov reg[0ah], 00h ; Port_2_IntCtrl_0 register (PRT2IC0)
004F 620B00 mov reg[0bh], 00h ; Port_2_IntCtrl_1 register (PRT2IC1)
0052 70EF and F, ~FLAG_XIO_MASK
0054 620900 mov reg[09h], 00h ; Port_2_IntEn register (PRT2IE)
0057 7110 or F, FLAG_XIO_MASK
0059 620C00 mov reg[0ch], 00h ; Port_3_DriveMode_0 register (PRT3DM0)
005C 620DFF mov reg[0dh], ffh ; Port_3_DriveMode_1 register (PRT3DM1)
005F 70EF and F, ~FLAG_XIO_MASK
0061 620FFF mov reg[0fh], ffh ; Port_3_DriveMode_2 register (PRT3DM2)
0064 620E00 mov reg[0eh], 00h ; Port_3_GlobalSelect register (PRT3GS)
0067 7110 or F, FLAG_XIO_MASK
0069 620E00 mov reg[0eh], 00h ; Port_3_IntCtrl_0 register (PRT3IC0)
006C 620F00 mov reg[0fh], 00h ; Port_3_IntCtrl_1 register (PRT3IC1)
006F 70EF and F, ~FLAG_XIO_MASK
0071 620D00 mov reg[0dh], 00h ; Port_3_IntEn register (PRT3IE)
0074 7110 or F, FLAG_XIO_MASK
0076 621000 mov reg[10h], 00h ; Port_4_DriveMode_0 register (PRT4DM0)
0079 6211FF mov reg[11h], ffh ; Port_4_DriveMode_1 register (PRT4DM1)
007C 70EF and F, ~FLAG_XIO_MASK
007E 6213FF mov reg[13h], ffh ; Port_4_DriveMode_2 register (PRT4DM2)
0081 621200 mov reg[12h], 00h ; Port_4_GlobalSelect register (PRT4GS)
0084 7110 or F, FLAG_XIO_MASK
0086 621200 mov reg[12h], 00h ; Port_4_IntCtrl_0 register (PRT4IC0)
0089 621300 mov reg[13h], 00h ; Port_4_IntCtrl_1 register (PRT4IC1)
008C 70EF and F, ~FLAG_XIO_MASK
008E 621100 mov reg[11h], 00h ; Port_4_IntEn register (PRT4IE)
0091 7110 or F, FLAG_XIO_MASK
0093 621400 mov reg[14h], 00h ; Port_5_DriveMode_0 register (PRT5DM0)
0096 6215FF mov reg[15h], ffh ; Port_5_DriveMode_1 register (PRT5DM1)
0099 70EF and F, ~FLAG_XIO_MASK
009B 6217FF mov reg[17h], ffh ; Port_5_DriveMode_2 register (PRT5DM2)
009E 621600 mov reg[16h], 00h ; Port_5_GlobalSelect register (PRT5GS)
00A1 7110 or F, FLAG_XIO_MASK
00A3 621600 mov reg[16h], 00h ; Port_5_IntCtrl_0 register (PRT5IC0)
00A6 621700 mov reg[17h], 00h ; Port_5_IntCtrl_1 register (PRT5IC1)
00A9 70EF and F, ~FLAG_XIO_MASK
00AB 621500 mov reg[15h], 00h ; Port_5_IntEn register (PRT5IE)
00AE 7110 or F, FLAG_XIO_MASK
00B0 621C00 mov reg[1ch], 00h ; Port_7_DriveMode_0 register (PRT7DM0)
00B3 621D81 mov reg[1dh], 81h ; Port_7_DriveMode_1 register (PRT7DM1)
00B6 70EF and F, ~FLAG_XIO_MASK
00B8 621F81 mov reg[1fh], 81h ; Port_7_DriveMode_2 register (PRT7DM2)
00BB 621E00 mov reg[1eh], 00h ; Port_7_GlobalSelect register (PRT7GS)
00BE 7110 or F, FLAG_XIO_MASK
00C0 621E00 mov reg[1eh], 00h ; Port_7_IntCtrl_0 register (PRT7IC0)
00C3 621F00 mov reg[1fh], 00h ; Port_7_IntCtrl_1 register (PRT7IC1)
00C6 70EF and F, ~FLAG_XIO_MASK
00C8 621D00 mov reg[1dh], 00h ; Port_7_IntEn register (PRT7IE)
00CB 70EF and F, ~FLAG_XIO_MASK
00CD ; Global Register values
00CD 626009 mov reg[60h], 09h ; AnalogColumnInputSelect register (AMX_IN)
00D0 626600 mov reg[66h], 00h ; AnalogComparatorControl1 register (CMP_CR1)
00D3 626100 mov reg[61h], 00h ; AnalogMuxBusConfig register (AMUXCFG)
00D6 626305 mov reg[63h], 05h ; AnalogReferenceControl register (ARF_CR)
00D9 626500 mov reg[65h], 00h ; AnalogSyncControl register (ASY_CR)
00DC 62FD00 mov reg[fdh], 00h ; DAC_Data register (DAC_D)
00DF 62E600 mov reg[e6h], 00h ; DecimatorControl_0 register (DEC_CR0)
00E2 62E700 mov reg[e7h], 00h ; DecimatorControl_1 register (DEC_CR1)
00E5 625600 mov reg[56h], 00h ; Endpoint0Control register (EP0_CR)
00E8 625700 mov reg[57h], 00h ; Endpoint0Count register (EP0_CNT)
00EB 625800 mov reg[58h], 00h ; Endpoint0Data0 register (EP0_DR0)
00EE 625900 mov reg[59h], 00h ; Endpoint0Data1 register (EP0_DR1)
00F1 625A00 mov reg[5ah], 00h ; Endpoint0Data2 register (EP0_DR2)
00F4 625B00 mov reg[5bh], 00h ; Endpoint0Data3 register (EP0_DR3)
00F7 625C00 mov reg[5ch], 00h ; Endpoint0Data4 register (EP0_DR4)
00FA 625D00 mov reg[5dh], 00h ; Endpoint0Data5 register (EP0_DR5)
00FD 625E00 mov reg[5eh], 00h ; Endpoint0Data6 register (EP0_DR6)
0100 625F00 mov reg[5fh], 00h ; Endpoint0Data7 register (EP0_DR7)
0103 624F00 mov reg[4fh], 00h ; Endpoint1Count0 register (EP1_CNT)
0106 624E00 mov reg[4eh], 00h ; Endpoint1Count1 register (EP1_CNT1)
0109 625100 mov reg[51h], 00h ; Endpoint2Count0 register (EP2_CNT)
010C 625000 mov reg[50h], 00h ; Endpoint2Count1 register (EP2_CNT1)
010F 625300 mov reg[53h], 00h ; Endpoint3Count0 register (EP3_CNT)
0112 625200 mov reg[52h], 00h ; Endpoint3Count1 register (EP3_CNT1)
0115 625500 mov reg[55h], 00h ; Endpoint4Count0 register (EP4_CNT)
0118 625400 mov reg[54h], 00h ; Endpoint4Count1 register (EP4_CNT1)
011B 62D600 mov reg[d6h], 00h ; I2CConfig register (I2CCFG)
011E 62B000 mov reg[b0h], 00h ; Row_0_InputMux register (RDI0RI)
0121 62B100 mov reg[b1h], 00h ; Row_0_InputSync register (RDI0SYN)
0124 62B200 mov reg[b2h], 00h ; Row_0_LogicInputAMux register (RDI0IS)
0127 62B333 mov reg[b3h], 33h ; Row_0_LogicSelect_0 register (RDI0LT0)
012A 62B433 mov reg[b4h], 33h ; Row_0_LogicSelect_1 register (RDI0LT1)
012D 62B500 mov reg[b5h], 00h ; Row_0_OutputDrive_0 register (RDI0SRO0)
0130 62B600 mov reg[b6h], 00h ; Row_0_OutputDrive_1 register (RDI0SRO1)
0133 624A00 mov reg[4ah], 00h ; USBControl_0 register (USB_CR0)
0136 624B00 mov reg[4bh], 00h ; USBIOControl_0 register (USBIO_CR0)
0139 624C00 mov reg[4ch], 00h ; USBIOControl_1 register (USBIO_CR1)
013C ; Instance name USBFS_1, User Module USBFS
013C 7110 or F, FLAG_XIO_MASK
013E ; Global Register values
013E 626100 mov
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -