OSDN Git Service

98f21541706a015e4735cb91bb6f9764d7e820e5
[fast-forth/master.git] / MSP430-FORTH / BOOT.4th
1 ; BOOT.4th
2
3 \ TARGET SELECTION
4 \ MSP_EXP430FR5739  MSP_EXP430FR5969    MSP_EXP430FR5994    MSP_EXP430FR6989
5 \ MSP_EXP430FR4133  MSP_EXP430FR2433    MSP_EXP430FR2355    CHIPSTICK_FR2433
6
7
8
9 \ SYSRSTIV decimal/hex values for MSP430FR5994 (device specific)
10 \ ----------------------------------------------------------   
11 \ #00 $00 No interrupt pending                                      
12 \ #02 $02 Brownout (BOR)                                            
13 \ #04 $04 RSTIFG RST/NMI (BOR)                                      
14 \ #06 $06 PMMSWBOR software BOR (BOR)                               
15 \ #08 $08 LPMx.5 wake up (BOR)                                      
16 \ #10 $0A violation memory protected areas (BOR)                                  
17 \ #12 $0C Reserved                                                  
18 \ #14 $0E SVSHIFG SVSH event (BOR)                                  
19 \ #16 $10 Reserved                                                  
20 \ #18 $12 Reserved                                                  
21 \ #20 $14 PMMSWPOR software POR (POR)                               
22 \ #22 $16 WDTIFG watchdog timeout (PUC)                             
23 \ #24 $18 WDTPW password violation (PUC)                            
24 \ #26 $1A FRCTLPW password violation (PUC)                          
25 \ #28 $1C Uncorrectable FRAM bit error detection (PUC)              
26 \ #30 $1E Peripheral area fetch (PUC)                               
27 \ #32 $20 PMMPW PMM password violation (PUC)                        
28 \ #34 $22 MPUPW MPU password violation (PUC)                        
29 \ #36 $24 CSPW CS password violation (PUC)                          
30 \ #38 $26 MPUSEGIPIFG encapsulated IP memory segment violation (PUC)
31 \ #40 $28 MPUSEGIIFG information memory segment violation (PUC)     
32 \ #42 $2A MPUSEG1IFG segment 1 memory violation (PUC)               
33 \ #44 $2C MPUSEG2IFG segment 2 memory violation (PUC)               
34 \ #46 $2E MPUSEG3IFG segment 3 memory violation (PUC)   
35
36
37
38
39
40 \ SYSRSTIV values added by FAST FORTH 
41 \ -----------------------------------
42 \ 05 reset after compilation of FAST FORTH kernel
43 \ -1 hardware DEEP RESET: restores state of the lastest FastForth flashed   
44              
45
46 \ note
47 \ Origin of reset is kept in SYSRSTIV register. Their values are device specific.
48 \ WARM displays the content of SYSRSTIV register.
49 \ When BOOT.4TH is called by the FastForth bootstrap, the SYSRSTIV value is on
50 \ the paramater stack, ready to test
51
52 \ --------------------------------------------------------------------------------
53 \ WARNING !
54 \ --------------------------------------------------------------------------------
55 \ it is not recommended to compile then execute a word to perform the bootstrap 
56 \ because the risk of crushing thereafter. Interpreting mode as below is required: 
57 \ --------------------------------------------------------------------------------
58
59
60 \ it's an example:
61
62 DUP $06 =
63 [IF]                \ origin of reset = COLD
64     LOAD" SD_TEST.4TH"
65 [ELSE] DUP $02 = 
66     [IF]            \ origin of reset = power ON
67         LOAD" RTC.4TH"
68     [THEN]
69 [THEN]
70 DROP
71 ECHO                \ don't forget!