Etape 3 #1
3 changed files with 49 additions and 67 deletions
|
@ -75,7 +75,7 @@
|
|||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
|
@ -125,7 +125,7 @@
|
|||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGDARM</Key>
|
||||
<Name>(1010=1003,355,1379,912,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=15,39,661,712,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=1462,180,1883,607,1)(121=1499,392,1920,819,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=1088,133,1682,884,1)(131=255,99,849,850,0)(132=49,93,643,844,0)(133=0,32,594,783,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||
<Name>(1010=1003,355,1379,912,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=15,39,661,712,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=1462,180,1883,607,1)(121=1499,392,1920,819,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=1088,133,1682,884,1)(131=255,99,849,850,0)(132=49,93,643,844,0)(133=867,101,1461,852,1)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
|
@ -142,23 +142,7 @@
|
|||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>81</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>.\FonctionEtape3.asm</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>1</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>54</LineNumber>
|
||||
<LineNumber>56</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134222998</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
|
@ -169,39 +153,7 @@
|
|||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\FonctionEtape3.asm</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\Simu_Etape0\FonctionEtape3.asm\54</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>2</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>55</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>.\FonctionEtape3.asm</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>3</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>82</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>.\FonctionEtape3.asm</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
<Expression>\\Simu_Etape0\FonctionEtape3.asm\56</Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<MemoryWindow1>
|
||||
|
@ -342,7 +294,7 @@
|
|||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
EXPORT Timer1_IRQHandler
|
||||
EXPORT Timer1Up_IRQHandler
|
||||
EXPORT setIRQFunction
|
||||
EXPORT Timer4_IRQHandler
|
||||
|
||||
IMPORT DriverReg
|
||||
IMPORT Tempo
|
||||
|
@ -52,7 +53,42 @@ TVI_Flash EQU 0x0
|
|||
|
||||
Timer1_IRQHandler PROC
|
||||
PUSH {LR}
|
||||
;On récupère le CNT, on le divise par le nombre de jeu de leds -> on affect le ARR du timer4
|
||||
LDR R0,=TIM1_CNT
|
||||
LDR R0,[R0]
|
||||
MOV R1,#2
|
||||
UDIV R0, R0, R1
|
||||
LDR R1,=TIM4_ARR
|
||||
STR R0,[R1]
|
||||
|
||||
LDR R0,=TIM1_CNT
|
||||
MOV R1,#0
|
||||
STR R1,[R0]
|
||||
|
||||
LDR R0,=TIM1_SR ;On charge l'adresse du flag
|
||||
LDR R1, [R0] ;On lit le flag dans SR
|
||||
AND R1, #~(1<<1) ;Reset le flag de CC1IF
|
||||
STR R1, [R0] ;On le stock
|
||||
BL Run_Timer4
|
||||
POP {LR}
|
||||
BX LR
|
||||
ENDP
|
||||
|
||||
Timer1Up_IRQHandler PROC
|
||||
PUSH {LR}
|
||||
BL Stop_Timer4
|
||||
LDR R0,=TIM1_SR ;On charge l'adresse du flag
|
||||
LDR R1, [R0] ;On lit le flag dans SR
|
||||
AND R1, #~(1<<0) ;Reset le flag de UIF
|
||||
STR R1, [R0] ;On le stock
|
||||
POP {LR}
|
||||
BX LR
|
||||
ENDP
|
||||
|
||||
Timer4_IRQHandler PROC
|
||||
; SwitchState;
|
||||
PUSH {LR}
|
||||
|
||||
LDR R2,=SwitchState ;On lit l'adresse de switch state
|
||||
LDRB R3,[R2] ;On charge la donnée
|
||||
CMP R3, #0 ;if(Switchstate == 0)
|
||||
|
@ -68,21 +104,10 @@ SETBarrette1
|
|||
STRB R3,[R2] ;On remet la donnée
|
||||
GoToDriverReg
|
||||
BL DriverReg ;DriverReg(Barette3)
|
||||
LDR R0,=TIM1_SR ;On charge l'adresse du flag
|
||||
LDR R1, [R0] ;On lit le flag dans SR
|
||||
AND R1, #~(1<<1) ;Reset le flag du SR
|
||||
STR R1, [R0] ;On le stock
|
||||
BL Stop_Timer4
|
||||
POP {LR}
|
||||
BX LR
|
||||
ENDP
|
||||
|
||||
Timer1Up_IRQHandler PROC
|
||||
PUSH {LR}
|
||||
BL Stop_Timer4
|
||||
LDR R0,=TIM1_SR ;On charge l'adresse du flag
|
||||
LDR R0,=TIM4_SR ;On charge l'adresse du flag
|
||||
LDR R1, [R0] ;On lit le flag dans SR
|
||||
AND R1, #~(1<<0) ;Reset le flag du SR
|
||||
AND R1, #~(1<<0) ;Reset le flag de UIF
|
||||
STR R1, [R0] ;On le stock
|
||||
POP {LR}
|
||||
BX LR
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
IMPORT Timer1_IRQHandler
|
||||
IMPORT Timer1Up_IRQHandler
|
||||
IMPORT setIRQFunction
|
||||
IMPORT Timer4_IRQHandler
|
||||
|
||||
EXPORT main
|
||||
|
||||
|
@ -54,6 +55,7 @@
|
|||
M EQU 20
|
||||
Timer_Up_Reg EQU (25*4)+0x40
|
||||
Timer_Cc_Reg EQU (27*4)+0x40
|
||||
Timer4_Reg EQU (30*4)+0x40
|
||||
|
||||
;***************CODE************************************************************
|
||||
AREA moncode, code, readonly
|
||||
|
@ -73,6 +75,9 @@ main PROC
|
|||
MOV R0, #Timer_Cc_Reg
|
||||
LDR R1,=Timer1_IRQHandler
|
||||
BL setIRQFunction
|
||||
MOV R0, #Timer4_Reg
|
||||
LDR R1,=Timer4_IRQHandler
|
||||
BL setIRQFunction
|
||||
BL Run_Timer3 ;Allumage du Timer 3
|
||||
BL Run_Timer1
|
||||
;*******************************************************************************
|
||||
|
|
Loading…
Add table
Reference in a new issue