OSDN Git Service

V 3.2
[fast-forth/master.git] / inc / MSP430FR2633.pat
index 662d2d2..9c712c4 100644 (file)
@@ -1,94 +1,5 @@
 !MSP430FR2633.pat
 
-! ----------------------------------------------
-! MSP430FR2633 MEMORY MAP
-! ----------------------------------------------
-! 0000-0FFF = peripherals (4 KB)
-! 1000-17FF = ROM bootstrap loader BSL1 (4x512 B)
-! 1800-187F = info B (FRAM 128 B)
-! 1880-18FF = info A (FRAM 128 B)
-! 1900-19FF = N/A (mirrored into info A/B)
-! 1A00-1A7F = TLV device descriptor info (FRAM 128 B)
-! 2000-2FFF = RAM (4 KB)
-! 4000-6FFF = ROM captivate (12 k)
-! C400-FF7F = code memory (FRAM 15232 B)
-! FF80-FFFF = interrupt vectors (FRAM 127 B)
-! ----------------------------------------------
-! ----------------------------------------------
-! FRAM                          ; INFO B, TLV
-! ----------------------------------------------
-INFO_ORG =\$1800!
-INFO_LEN=\$0200!
-TLV_ORG=\$1A00!     Device Descriptor Info (Tag-Lenght-Value)
-TLV_LEN=\$0080!
-DEVICEID=\$1A04!
-! ----------------------------------------------
-! RAM
-! ----------------------------------------------
-RAM_ORG=\$2000!
-RAM_LEN=\$1000!
-! ----------------------------------------------
-! FRAM
-! ----------------------------------------------
-MAIN_ORG=\$C400!        Code space start
-xdodoes=\$C400!         restore rDODOES: MOV #xdodoes,rDODOES
-xdocon=\$C40E!          restore rDOCON: MOV #xdocon,rDOCON
-xdovar=\$C420!          restore rDOVAR: MOV #xdocon,rDOVAR  
-xdocol=\$C42A!          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 - MSP430FR2633
-! ----------------------------------------------
-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; must be reset by wipe.
-JTAG_SIG2=\$FF82!       if JTAG_SIG1=\$AAAA, length of password string @ JTAG_PASSWORD
-BSL_SIG1=\$FF84!  
-BSL_SIG2=\$FF86!  
-JTAG_PASSWORD=\$FF88!   256 bits
-BSL_PASSWORD=\$FFE0!    256 bits
-VECT_ORG=\$FFD8!        FFD8-FFFF
-VECT_LEN=\$28!
-
-
-CAPTIVATE_Vec=\$FFD8!
-P2_Vec=\$FFDA!
-P1_Vec=\$FFDC!
-ADC10_B_Vec=\$FFDE!
-eUSCI_B0_Vec=\$FFE0!
-eUSCI_A1_Vec=\$FFE2!
-eUSCI_A0_Vec=\$FFE4!
-WDT_Vec=\$FFE6!
-RTC_Vec=\$FFE8!
-TA3_x_Vec=\$FFEA!
-TA3_0_Vec=\$FFEC!
-TA2_x_Vec=\$FFEE!
-TA2_0_Vec=\$FFF0!
-TA1_x_Vec=\$FFF2!
-TA1_0_Vec=\$FFF4!
-TA0_x_Vec=\$FFF6!
-TA0_0_Vec=\$FFF8!
-U_NMI_Vec=\$FFFA!
-S_NMI_Vec=\$FFFC!
-RST_Vec=\$FFFE!
-
-
-!MSP430FR2xxx.pat
-
-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 :
 ! ============================================
@@ -105,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 :
 ! ============================================
@@ -135,19 +52,38 @@ NOP3=MOV R0,R0!     \ MOV PC,PC      one word three cycles
 NEXT=MOV \@R13+,R0! \ MOV @IP+,PC   
 SEMI=MOV \@R1+,R13\nMOV \@R13+,R0!
 
+! ----------------------------------------------
+! MSP430FR2633 MEMORY MAP
+! ----------------------------------------------
+! 0000-0FFF = peripherals (4 KB)
+! 1000-17FF = ROM bootstrap loader BSL1 (4x512 B)
+! 1800-19FF = info B (FRAM 512 B)
+! 1A00-1A7F = TLV device descriptor info (FRAM 128 B)
+! 2000-2FFF = RAM (4 KB)
+! 4000-6FFF = ROM captivate (12 k)
+! C400-FF7F = code memory (FRAM 15232 B)
+! FF80-FFFF = interrupt vectors (FRAM 128 B)
+! FFC00-FFFFF = BSL2 (2k)
+! ----------------------------------------------
+!PAGESIZE        .equ 512         ; MPU unit
 
-! ===========================================================
-! MSP430FR2xxx and FR4xxx DEVICES HAVE SPECIFIC RAM ADDRESSES
-! ===========================================================
-
-
-! 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
@@ -165,9 +101,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=\$0080!
+DEVICEID=\$1A04!
+
+! ============================================
+! RAM
 ! ============================================
+RAM_ORG=\$2000!
+RAM_LEN=\$1000!
 
+! ---------------------------------------
+! FORTH RAM areas :
+! ---------------------------------------
 LSTACK_SIZE=\#16! words
 PSTACK_SIZE=\#48! words
 RSTACK_SIZE=\#48! words
@@ -175,11 +123,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
@@ -196,10 +142,9 @@ TIB_ORG=\$213C!     \ Terminal input buffer, 84 bytes, grow up
 HOLDS_ORG=\$2190!   \ a good address for HOLDS
 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!
@@ -333,10 +278,80 @@ SD_END=\$2570!
 SD_LEN=\$16E!
 
 ! ============================================
-! Special Fonction Registers (SFR)
+! FRAM MAIN
 ! ============================================
+MAIN_ORG=\$C400!        Code space start
+
+SLEEP=\$C400! 
+BODYSLEEP=\$C404!
+VECT_RESET=\$C40E! 
+LIT=\$C424! 
+NEXT_ADR=\$C42C!
+XSQUOTE=\$C42E! 
+QTBRAN=\$C442! 
+BRAN=\$C448! 
+QFBRAN=\$C44C! 
+SKIPBRAN=\$C452! 
+XDO=\$C456! 
+XPLOOP=\$C466! 
+XLOOP=\$C478! 
+MUSMOD=\$C47E!          unsigned 32/16 division
+SETIB=\$C4C4!           Set Input Buffer with org len values, reset >IN 
+REFILL=\$C4D4!          accept one line from input and leave org len of input buffer
+CIB_ADR=\$C4E4!         contents currently TIB_ORG; may be redirected to SDIB_ORG
+XDODOES=\$C4EC!         restore rDODOES: MOV #XDODOES,rDODOES
+XDOCON=\$C4FA!          restore rDOCON: MOV #XDOCON,rDOCON
+XDOVAR=\$C506!          restore rDOVAR: MOV #XDOCON,rDOVAR  
+RFROM=\$C506!           
+XDOCOL=\$C510!          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 - MSP430FR2633
+! ----------------------------------------------
+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; must be reset by wipe.
+JTAG_SIG2=\$FF82!       if JTAG_SIG1=\$AAAA, length of password string @ JTAG_PASSWORD
+BSL_SIG1=\$FF84!  
+BSL_SIG2=\$FF86!  
+JTAG_PASSWORD=\$FF88!   256 bits
+BSL_PASSWORD=\$FFE0!    256 bits
+VECT_ORG=\$FFD8!        FFD8-FFFF
+VECT_LEN=\$28!
 
+CAPTIVATE_Vec=\$FFD8!
+P2_Vec=\$FFDA!
+P1_Vec=\$FFDC!
+ADC10_B_Vec=\$FFDE!
+eUSCI_B0_Vec=\$FFE0!
+eUSCI_A1_Vec=\$FFE2!
+eUSCI_A0_Vec=\$FFE4!
+WDT_Vec=\$FFE6!
+RTC_Vec=\$FFE8!
+TA3_x_Vec=\$FFEA!
+TA3_0_Vec=\$FFEC!
+TA2_x_Vec=\$FFEE!
+TA2_0_Vec=\$FFF0!
+TA1_x_Vec=\$FFF2!
+TA1_0_Vec=\$FFF4!
+TA0_x_Vec=\$FFF6!
+TA0_0_Vec=\$FFF8!
+U_NMI_Vec=\$FFFA!
+S_NMI_Vec=\$FFFC!
+RST_Vec=\$FFFE!
 
+! ============================================
+! Special Fonction Registers (SFR)
+! ============================================
 
 SFRIE1=\$100!       \ SFR enable register
 SFRIFG1=\$102!      \ SFR flag register