OSDN Git Service

V 3.2
[fast-forth/master.git] / inc / MSP430FR2355.pat
index 5636198..152726b 100644 (file)
@@ -1,113 +1,5 @@
 !MSP430FR2355.pat
 
-! ----------------------------------------------
-! MSP430FR2355 MEMORY MAP
-! ----------------------------------------------
-! 0000-0005 = reserved
-! 0006-001F = tiny RAM
-! 0020-0FFF = peripherals (4 KB)
-! 1000-17FF = ROM bootstrap loader BSL1 (2k)
-! 1800-19FF = information memory (FRAM 512 B)
-! 1A00-1A31 = TLV device descriptor info (FRAM 128 B)
-! 1A80-1FFF = unused
-! 2000-2FFF = RAM (4 KB)
-! 2800-7FFF = unused
-! 8000-FF7F = code memory (FRAM 15232 B)
-! FF80-FFFF = interrupt vectors (FRAM 128 B)
-! FFC00-FFFFF = BSL2 (2k)
-! ----------------------------------------------
-! MSP430FR2355 DEVICE ID
-! ----------------------------------------------
-! 1A04 = 0C, 1A05 = 83
-! ----------------------------------------------
-PAGESIZE=512!         ; MPU unit
-! ----------------------------------------------
-! BSL
-! ----------------------------------------------
-BSL1=\$1000!
-BSL2=\$FFC00!
-! ----------------------------------------------
-! FRAM                          ! INFO B, TLV
-! ----------------------------------------------
-TINYRAM_ORG=\$6!
-TINYRAM_LEN=\$1A!
-INFO_ORG=\$1800!
-INFO_LEN=\$0200!
-TLV_ORG=\$1A00!      ! Device Descriptor Info (Tag-Lenght-Value)
-TLV_LEN=\$0032!      !
-DEVICEID=\$1A04!
-! ----------------------------------------------
-! RAM
-! ----------------------------------------------
-RAM_ORG=\$2000!
-RAM_LEN=\$1000!
-! ----------------------------------------------
-! FRAM
-! ----------------------------------------------
-MAIN_ORG=\$8000!        Code space start
-xdodoes=\$8000!         restore rDODOES: MOV #xdodoes,rDODOES
-xdocon=\$800E!          restore rDOCON: MOV #xdocon,rDOCON
-xdovar=\$8020!          restore rDOVAR: MOV #xdocon,rDOVAR  
-xdocol=\$802A!          restore rDOCOL: MOV #xdocol,rDOCOL      only for DTC model = 1
-DODOES=\$1284!          CALL rDODOES
-DOCON=\$1285!           CALL rDOCON
-DOVAR=\$1286!           CALL rDOVAR
-
-! to find DTC value, download \MSP430-FORTH\FastForthSpecs.4th
-! if DTC = 1, restore rDOCOL as this : MOV #xdocol,rDOCOL
-! if DTC = 2, restore rDOCOL as this : MOV #EXIT,rDOCOL
-! if DTC = 3, nothing to do, R7 is free for use.
-! ----------------------------------------------
-! Interrupt Vectors and signatures - MSP430FR2355
-! ----------------------------------------------
-FRAM_FULL=\$FF30!       80 bytes are sufficient considering what can be compiled in one line and WORD use.
-SIGNATURES=\$FF80!      JTAG/BSL signatures
-JTAG_SIG1=\$FF80!       if 0 (electronic fuse=0) enable JTAG/SBW ! reset by wipe and by S1+<reset>
-JTAG_SIG2=\$FF82!       if JTAG_SIG <> |0xFFFFFFFF, 0x00000000|, SBW and JTAG are locked
-BSL_SIG1=\$FF84!
-BSL_SIG2=\$FF86!
-BSL_CONF_SIG=\$FF88!
-BSL_CONF=\$FF8A!
-BSL_I2C_ADRE=\$FF8C!
-JTAG_PASSWORD=\$FF88!   256 bits
-BSL_PASSWORD=\$FFE0!    256 bits
-VECT_ORG=\$FFCE!         FFCE-FFFF :  24 vectors + reset
-VECT_LEN=\$32!
-
-P4_Vec=\$FFCE!
-P3_Vec=\$FFD0!
-P2_Vec=\$FFD2!
-P1_Vec=\$FFD4!
-SAC1SAC3_Vec=\$FFD6!
-SAC0SAC2_Vec=\$FFD8!
-eCOMPx_Vec=\$FFDA!
-ADC10_Vec=\$FFDC!
-eUSCI_B1_Vec=\$FFDE!
-eUSCI_B0_Vec=\$FFE0!
-eUSCI_A1_Vec=\$FFE2!
-eUSCI_A0_Vec=\$FFE4!
-WDT_Vec=\$FFE6!
-RTC_Vec=\$FFE8!
-TB3_x_Vec=\$FFEA!
-TB3_0_Vec=\$FFEC!
-TB2_x_Vec=\$FFEE!
-TB2_0_Vec=\$FFF0!
-TB1_x_Vec=\$FFF2!
-TB1_0_Vec=\$FFF4!
-TB0_x_Vec=\$FFF6!
-TB0_0_Vec=\$FFF8!
-U_NMI_Vec=\$FFFA!
-S_NMI_Vec=\$FFFC!
-RST_Vec=\$FFFE!
-
-
-LPM4=\$F8! SR(LPM4+GIE)
-LPM3=\$D8! SR(LPM3+GIE)
-LPM2=\$98! SR(LPM2+GIE)
-LPM1=\$58! SR(LPM1+GIE)
-LPM0=\$18! SR(LPM0+GIE)
-
-
 ! ============================================
 ! SR bits :
 ! ============================================
@@ -124,6 +16,12 @@ LPM0=\$18! SR(LPM0+GIE)
 \#UF10=\#\$400! = SR(10) User Flag 2
 \#UF11=\#\$800! = SR(11) User Flag 3
 
+LPM4=\$F8!      = SR(LPM4+GIE)
+LPM3=\$D8!      = SR(LPM3+GIE)
+LPM2=\$98!      = SR(LPM2+GIE)
+LPM1=\$58!      = SR(LPM1+GIE)
+LPM0=\$18!      = SR(LPM0+GIE)
+
 ! ============================================
 ! PORTx, Reg  bits :
 ! ============================================
@@ -155,18 +53,52 @@ NEXT=MOV \@R13+,R0! \ MOV @IP+,PC
 SEMI=MOV \@R1+,R13\nMOV \@R13+,R0!
 
 
-! ===========================================================
-! MSP430FR2xxx and FR4xxx DEVICES HAVE SPECIFIC RAM ADDRESSES
-! ===========================================================
+! ----------------------------------------------
+! MSP430FR2355 MEMORY MAP
+! ----------------------------------------------
+! 0000-0005 = reserved
+! 0006-001F = tiny RAM
+! 0020-0FFF = peripherals (4 KB)
+! 1000-17FF = ROM bootstrap loader BSL1 (2k)
+! 1800-19FF = information memory (FRAM 512 B)
+! 1A00-1A31 = TLV device descriptor info (FRAM 128 B)
+! 1A80-1FFF = unused
+! 2000-2FFF = RAM (4 KB)
+! 2800-7FFF = unused
+! 8000-FF7F = code memory (FRAM 15232 B)
+! FF80-FFFF = interrupt vectors (FRAM 128 B)
+! FFC00-FFFFF = BSL2 (2k)
+! ----------------------------------------------
+! MSP430FR2355 DEVICE ID
+! ----------------------------------------------
+! 1A04 = 0C, 1A05 = 83
+! ----------------------------------------------
+PAGESIZE=512!         ; MPU unit
+
 
+! ============================================
+! TINY RAM
+! ============================================
+TINYRAM_ORG=\$6!
+TINYRAM_LEN=\$1A!
 
-! You can check the addresses below by comparing their values in DTCforthMSP430FRxxxx.lst
-! those addresses are usable with the symbolic assembler
+! ============================================
+! BSL
+! ============================================
+BSL1=\$1000!
+BSL2=\$FFC00!
 
 ! ============================================
-! FastForth INFO(DCBA) memory map (256 bytes):
+! FRAM INFO
 ! ============================================
+INFO_ORG=\$1800!
+INFO_LEN=\$0200!
 
+! You can check the addresses below by comparing their values in DTCforthMSP430FRxxxx.lst
+! those addresses are usable with the symbolic assembler
+! ----------------------------------------------
+! FastForth INFO
+! ----------------------------------------------
 INI_THREAD=\$1800!      .word THREADS
 TERMBRW_RST=\$1802!     .word TERMBRW_RST
 TERMMCTLW_RST=\$1804!   .word TERMMCTLW_RST
@@ -184,9 +116,21 @@ ReadSectorWX=\$1818!    call with W = SectorLO  X = SectorHI
 WriteSectorWX=\$181A!   call with W = SectorLO  X = SectorHI
 
 ! ============================================
-! FORTH RAM areas :
+! FRAM TLV
 ! ============================================
+TLV_ORG=\$1A00!     Device Descriptor Info (Tag-Lenght-Value)
+TLV_LEN=\$0032!
+DEVICEID=\$1A04!
 
+! ============================================
+! RAM
+! ============================================
+RAM_ORG=\$2000!
+RAM_LEN=\$1000!
+
+! ----------------------------------------------
+! FORTH RAM areas :
+! ----------------------------------------------
 LSTACK_SIZE=\#16! words
 PSTACK_SIZE=\#48! words
 RSTACK_SIZE=\#48! words
@@ -194,11 +138,9 @@ PAD_LEN=\#84! bytes
 TIB_LEN=\#84! bytes
 HOLD_SIZE=\#34! bytes
 
-! ============================================
+! ----------------------------------------------
 ! FastForth RAM memory map (>= 1k):
-! ============================================
-
-
+! ----------------------------------------------
 LEAVEPTR=\$2000!    \ Leave-stack pointer, init by QUIT
 LSATCK=\$2000!      \ leave stack,      grow up
 PSTACK=\$2080!      \ parameter stack,  grow down
@@ -218,7 +160,6 @@ HOLD_BASE=\$21B2!   \ BASE HOLD area, grow down
 ! ----------------------
 ! NOT SAVED VARIABLES
 ! ----------------------
-
 HP=\$21B2!              HOLD ptr
 CAPS=\$21B4!            CAPS ON/OFF flag, must be set to -1 before first reset !
 LAST_NFA=\$21B6!
@@ -226,7 +167,7 @@ LAST_THREAD=\$21B8!
 LAST_CFA=\$21BA!
 LAST_PSP=\$21BC!
 
-STATEADR=\$21BE!           Interpreter state
+STATEADR=\$21BE!        Interpreter state
 
 SOURCE_LEN=\$21C0!      len of input stream
 SOURCE_ORG=\$21C2!      adr of input stream
@@ -240,7 +181,7 @@ CURRENT=\$21DA!         CURRENT dictionnary ptr
 BASEADR=\$21DC!           numeric base, must be defined before first reset !
 LINE=\$21DE!            line in interpretation, activated with NOECHO, desactivated with ECHO
 ! ---------------------------------------
-!21E0! 28 RAM bytes free conditionnaly
+!21E0! 28 RAM bytes free
 ! ---------------------------------------
 
 ! ---------------------------------------
@@ -351,6 +292,87 @@ SDIB_ORG=\$251C!
 SD_END=\$2570!
 SD_LEN=\$16E!
 
+! ============================================
+! FRAM MAIN
+! ============================================
+MAIN_ORG=\$8000!        Code space start
+
+SLEEP=\$8000! 
+BODYSLEEP=\$8004!
+VECT_RESET=\$800E! 
+LIT=\$8024! 
+NEXT_ADR=\$802C!
+XSQUOTE=\$802E! 
+QTBRAN=\$8042! 
+BRAN=\$8048! 
+QFBRAN=\$804C! 
+SKIPBRAN=\$8052! 
+XDO=\$8056! 
+XPLOOP=\$8066! 
+XLOOP=\$8078! 
+MUSMOD=\$807E!          unsigned 32/16 division
+SETIB=\$80C4!           Set Input Buffer with org len values, reset >IN 
+REFILL=\$80D4!          accept one line from input and leave org len of input buffer
+CIB_ADR=\$80E4!         contents currently TIB_ORG; may be redirected to SDIB_ORG
+XDODOES=\$80EC!         restore rDODOES: MOV #XDODOES,rDODOES
+XDOCON=\$80FA!          restore rDOCON: MOV #XDOCON,rDOCON
+XDOVAR=\$8106!          restore rDOVAR: MOV #XDOCON,rDOVAR  
+RFROM=\$8106!           
+XDOCOL=\$8110!          restore rDOCOL: MOV #XDOCOL,rDOCOL      only for DTC model = 1
+
+DODOES=\$1284!          CALL rDODOES
+DOCON=\$1285!           CALL rDOCON
+DOVAR=\$1286!           CALL rDOVAR
+DOCOL=\$1287!
+
+! to find DTC value, download \MSP430-FORTH\FastForthSpecs.4th
+! if DTC = 1, restore rDOCOL as this : MOV #xdocol,rDOCOL
+! if DTC = 2, restore rDOCOL as this : MOV #EXIT,rDOCOL
+! if DTC = 3, nothing to do, R7 is free for use.
+! ----------------------------------------------
+! Interrupt Vectors and signatures - MSP430FR2355
+! ----------------------------------------------
+FRAM_FULL=\$FF30!       80 bytes are sufficient considering what can be compiled in one line and WORD use.
+SIGNATURES=\$FF80!      JTAG/BSL signatures
+JTAG_SIG1=\$FF80!       if 0 (electronic fuse=0) enable JTAG/SBW ! reset by wipe and by S1+<reset>
+JTAG_SIG2=\$FF82!       if JTAG_SIG <> |0xFFFFFFFF, 0x00000000|, SBW and JTAG are locked
+BSL_SIG1=\$FF84!
+BSL_SIG2=\$FF86!
+BSL_CONF_SIG=\$FF88!
+BSL_CONF=\$FF8A!
+BSL_I2C_ADRE=\$FF8C!
+JTAG_PASSWORD=\$FF88!   256 bits
+BSL_PASSWORD=\$FFE0!    256 bits
+VECT_ORG=\$FFCE!         FFCE-FFFF :  24 vectors + reset
+VECT_LEN=\$32!
+
+P4_Vec=\$FFCE!
+P3_Vec=\$FFD0!
+P2_Vec=\$FFD2!
+P1_Vec=\$FFD4!
+SAC1SAC3_Vec=\$FFD6!
+SAC0SAC2_Vec=\$FFD8!
+eCOMPx_Vec=\$FFDA!
+ADC10_Vec=\$FFDC!
+eUSCI_B1_Vec=\$FFDE!
+eUSCI_B0_Vec=\$FFE0!
+eUSCI_A1_Vec=\$FFE2!
+eUSCI_A0_Vec=\$FFE4!
+WDT_Vec=\$FFE6!
+RTC_Vec=\$FFE8!
+TB3_x_Vec=\$FFEA!
+TB3_0_Vec=\$FFEC!
+TB2_x_Vec=\$FFEE!
+TB2_0_Vec=\$FFF0!
+TB1_x_Vec=\$FFF2!
+TB1_0_Vec=\$FFF4!
+TB0_x_Vec=\$FFF6!
+TB0_0_Vec=\$FFF8!
+U_NMI_Vec=\$FFFA!
+S_NMI_Vec=\$FFFC!
+RST_Vec=\$FFFE!
+
+
 
 ! ----------------------------------------------------------------------
 ! MSP430FR2355 Peripheral File Map