test deux jeux avec arrêt de timer4
This commit is contained in:
parent
f2debd03de
commit
b1435ee263
5 changed files with 175 additions and 16 deletions
|
@ -75,7 +75,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>0</IsCurrentTarget>
|
<IsCurrentTarget>1</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
@ -125,7 +125,7 @@
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>DLGDARM</Key>
|
<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=1142,371,1736,1122,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=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>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
@ -142,9 +142,25 @@
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>50</LineNumber>
|
<LineNumber>81</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>1</EnabledFlag>
|
||||||
<Address>134222940</Address>
|
<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>
|
||||||
|
<EnabledFlag>1</EnabledFlag>
|
||||||
|
<Address>134222998</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
|
@ -153,7 +169,39 @@
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
<Filename>.\FonctionEtape3.asm</Filename>
|
<Filename>.\FonctionEtape3.asm</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\Simu_Etape0\FonctionEtape3.asm\50</Expression>
|
<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>
|
||||||
</Bp>
|
</Bp>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
|
@ -196,7 +244,7 @@
|
||||||
<AscS3>0</AscS3>
|
<AscS3>0</AscS3>
|
||||||
<aSer3>0</aSer3>
|
<aSer3>0</aSer3>
|
||||||
<eProf>0</eProf>
|
<eProf>0</eProf>
|
||||||
<aLa>1</aLa>
|
<aLa>0</aLa>
|
||||||
<aPa1>0</aPa1>
|
<aPa1>0</aPa1>
|
||||||
<AscS4>0</AscS4>
|
<AscS4>0</AscS4>
|
||||||
<aSer4>0</aSer4>
|
<aSer4>0</aSer4>
|
||||||
|
@ -294,7 +342,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>1</IsCurrentTarget>
|
<IsCurrentTarget>0</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
@ -366,9 +414,9 @@
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>56</LineNumber>
|
<LineNumber>55</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>1</EnabledFlag>
|
||||||
<Address>134223162</Address>
|
<Address>134223214</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
|
@ -377,7 +425,7 @@
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
<Filename>.\FonctionEtape3.asm</Filename>
|
<Filename>.\FonctionEtape3.asm</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\Reel_Etape0\FonctionEtape3.asm\56</Expression>
|
<Expression>\\Reel_Etape0\FonctionEtape3.asm\55</Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
|
@ -494,6 +542,18 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<GroupNumber>1</GroupNumber>
|
||||||
|
<FileNumber>5</FileNumber>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<tvExp>0</tvExp>
|
||||||
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
<bDave2>0</bDave2>
|
||||||
|
<PathWithFileName>.\Mire.asm</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>Mire.asm</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -504,7 +564,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>5</FileNumber>
|
<FileNumber>6</FileNumber>
|
||||||
<FileType>4</FileType>
|
<FileType>4</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
|
@ -403,6 +403,11 @@
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<FilePath>.\FonctionEtape3.asm</FilePath>
|
<FilePath>.\FonctionEtape3.asm</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>Mire.asm</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>.\Mire.asm</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -820,6 +825,11 @@
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<FilePath>.\FonctionEtape3.asm</FilePath>
|
<FilePath>.\FonctionEtape3.asm</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>Mire.asm</FileName>
|
||||||
|
<FileType>2</FileType>
|
||||||
|
<FilePath>.\Mire.asm</FilePath>
|
||||||
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
|
|
||||||
IMPORT DataSend
|
IMPORT DataSend
|
||||||
EXPORT Init_TVI
|
EXPORT Init_TVI
|
||||||
|
IMPORT Stop_Timer4
|
||||||
|
IMPORT Run_Timer4
|
||||||
|
IMPORT mire
|
||||||
EXPORT Timer1_IRQHandler
|
EXPORT Timer1_IRQHandler
|
||||||
|
EXPORT Timer1Up_IRQHandler
|
||||||
EXPORT setIRQFunction
|
EXPORT setIRQFunction
|
||||||
|
|
||||||
IMPORT DriverReg
|
IMPORT DriverReg
|
||||||
|
@ -48,6 +52,7 @@ TVI_Flash EQU 0x0
|
||||||
|
|
||||||
Timer1_IRQHandler PROC
|
Timer1_IRQHandler PROC
|
||||||
PUSH {LR}
|
PUSH {LR}
|
||||||
|
BL Run_Timer4
|
||||||
LDR R2,=SwitchState ;On lit l'adresse de switch state
|
LDR R2,=SwitchState ;On lit l'adresse de switch state
|
||||||
LDRB R3,[R2] ;On charge la donnée
|
LDRB R3,[R2] ;On charge la donnée
|
||||||
CMP R3, #0 ;if(Switchstate == 0)
|
CMP R3, #0 ;if(Switchstate == 0)
|
||||||
|
@ -63,10 +68,22 @@ SETBarrette1
|
||||||
STRB R3,[R2] ;On remet la donnée
|
STRB R3,[R2] ;On remet la donnée
|
||||||
GoToDriverReg
|
GoToDriverReg
|
||||||
BL DriverReg ;DriverReg(Barette3)
|
BL DriverReg ;DriverReg(Barette3)
|
||||||
LDR R0,=TIM1_SR
|
LDR R0,=TIM1_SR ;On charge l'adresse du flag
|
||||||
LDR R1, [R0]
|
LDR R1, [R0] ;On lit le flag dans SR
|
||||||
AND R1, #~(1<<1)
|
AND R1, #~(1<<1) ;Reset le flag du SR
|
||||||
STR R1, [R0]
|
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 R1, [R0] ;On lit le flag dans SR
|
||||||
|
AND R1, #~(1<<0) ;Reset le flag du SR
|
||||||
|
STR R1, [R0] ;On le stock
|
||||||
POP {LR}
|
POP {LR}
|
||||||
BX LR
|
BX LR
|
||||||
ENDP
|
ENDP
|
||||||
|
|
68
Mire.asm
Normal file
68
Mire.asm
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
;************************************************************************
|
||||||
|
THUMB
|
||||||
|
REQUIRE8
|
||||||
|
PRESERVE8
|
||||||
|
;************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
;**************************************
|
||||||
|
; Affectation des bits GPIO
|
||||||
|
;***************************************
|
||||||
|
; GSLCK..... PA0
|
||||||
|
; DSPRG..... PA1
|
||||||
|
; BLANK..... PA2
|
||||||
|
; XLAT...... PA3
|
||||||
|
; VPRG...... PA4
|
||||||
|
; SCLK...... PA5
|
||||||
|
; SIN1...... PA7
|
||||||
|
;Capteur.....PA8
|
||||||
|
|
||||||
|
;LED.........PB10
|
||||||
|
;****************************************/
|
||||||
|
|
||||||
|
|
||||||
|
;***************CONSTANTES*************************************************
|
||||||
|
|
||||||
|
|
||||||
|
Nbsecteurs equ 8
|
||||||
|
PuissanceNbSecteur equ 3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;************************************************************************
|
||||||
|
; IMPORT/EXPORT Système
|
||||||
|
;************************************************************************
|
||||||
|
|
||||||
|
IMPORT ||Lib$$Request$$armlib|| [CODE,WEAK]
|
||||||
|
|
||||||
|
|
||||||
|
; IMPORT/EXPORT de procédure
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EXPORT mire
|
||||||
|
|
||||||
|
;*******************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
;*******************************************************************************
|
||||||
|
AREA mesdonnees, data, readonly
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mire DCB 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0, 255,0,0
|
||||||
|
DCB 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0, 0,255,0
|
||||||
|
DCB 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255, 0,0,255
|
||||||
|
DCB 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0, 255,255,0
|
||||||
|
DCB 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255, 255,0,255
|
||||||
|
DCB 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255
|
||||||
|
DCB 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255, 255,255,255
|
||||||
|
DCB 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;*******************************************************************************
|
||||||
|
END
|
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
IMPORT Init_TVI
|
IMPORT Init_TVI
|
||||||
IMPORT Timer1_IRQHandler
|
IMPORT Timer1_IRQHandler
|
||||||
|
IMPORT Timer1Up_IRQHandler
|
||||||
IMPORT setIRQFunction
|
IMPORT setIRQFunction
|
||||||
|
|
||||||
EXPORT main
|
EXPORT main
|
||||||
|
@ -60,12 +61,15 @@ Timer_Cc_Reg EQU (27*4)+0x40
|
||||||
;*******************************************************************************
|
;*******************************************************************************
|
||||||
main PROC
|
main PROC
|
||||||
;*******************************************************************************
|
;*******************************************************************************
|
||||||
|
BL Init_TVI;
|
||||||
MOV R0,#2
|
MOV R0,#2
|
||||||
BL Init_Cible;
|
BL Init_Cible;
|
||||||
;*******************************************************************************
|
;*******************************************************************************
|
||||||
; ETAPE 3
|
; ETAPE 3
|
||||||
;*******************************************************************************
|
;*******************************************************************************
|
||||||
BL Init_TVI;
|
MOV R0, #Timer_Up_Reg
|
||||||
|
LDR R1,=Timer1Up_IRQHandler
|
||||||
|
BL setIRQFunction
|
||||||
MOV R0, #Timer_Cc_Reg
|
MOV R0, #Timer_Cc_Reg
|
||||||
LDR R1,=Timer1_IRQHandler
|
LDR R1,=Timer1_IRQHandler
|
||||||
BL setIRQFunction
|
BL setIRQFunction
|
||||||
|
|
Loading…
Add table
Reference in a new issue