Mire fonctionnel (bug derniere led)
This commit is contained in:
parent
e1fbde0b2b
commit
73bb07a0d3
2 changed files with 39 additions and 23 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>
|
||||||
|
@ -142,9 +142,9 @@
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>56</LineNumber>
|
<LineNumber>106</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>1</EnabledFlag>
|
||||||
<Address>134222998</Address>
|
<Address>134223108</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
|
@ -153,14 +153,14 @@
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
<Filename>.\FonctionEtape3.asm</Filename>
|
<Filename>.\FonctionEtape3.asm</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\Simu_Etape0\FonctionEtape3.asm\56</Expression>
|
<Expression>\\Simu_Etape0\FonctionEtape3.asm\106</Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
<Mm>
|
<Mm>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<SubType>0</SubType>
|
<SubType>0</SubType>
|
||||||
<ItemText>0x20000200</ItemText>
|
<ItemText>0x08001650</ItemText>
|
||||||
<AccSizeX>0</AccSizeX>
|
<AccSizeX>0</AccSizeX>
|
||||||
</Mm>
|
</Mm>
|
||||||
</MemoryWindow1>
|
</MemoryWindow1>
|
||||||
|
@ -294,7 +294,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,18 +366,34 @@
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>55</LineNumber>
|
<LineNumber>106</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>1</EnabledFlag>
|
||||||
<Address>134223214</Address>
|
<Address>0</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
<SizeOfObject>0</SizeOfObject>
|
<SizeOfObject>0</SizeOfObject>
|
||||||
<BreakByAccess>0</BreakByAccess>
|
<BreakByAccess>0</BreakByAccess>
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
<Filename>.\FonctionEtape3.asm</Filename>
|
<Filename>.\FonctionEtape3.asm</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\Reel_Etape0\FonctionEtape3.asm\55</Expression>
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>1</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>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
|
@ -394,7 +410,7 @@
|
||||||
<DebugFlag>
|
<DebugFlag>
|
||||||
<trace>0</trace>
|
<trace>0</trace>
|
||||||
<periodic>0</periodic>
|
<periodic>0</periodic>
|
||||||
<aLwin>1</aLwin>
|
<aLwin>0</aLwin>
|
||||||
<aCover>0</aCover>
|
<aCover>0</aCover>
|
||||||
<aSer1>0</aSer1>
|
<aSer1>0</aSer1>
|
||||||
<aSer2>0</aSer2>
|
<aSer2>0</aSer2>
|
||||||
|
|
|
@ -56,7 +56,7 @@ Timer1_IRQHandler PROC
|
||||||
;On récupère le CNT, on le divise par le nombre de jeu de leds -> on affect le ARR du timer4
|
;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,=TIM1_CNT
|
||||||
LDR R0,[R0]
|
LDR R0,[R0]
|
||||||
MOV R1,#2
|
MOV R1,#8
|
||||||
UDIV R0, R0, R1
|
UDIV R0, R0, R1
|
||||||
LDR R1,=TIM4_ARR
|
LDR R1,=TIM4_ARR
|
||||||
STR R0,[R1]
|
STR R0,[R1]
|
||||||
|
@ -91,20 +91,20 @@ Timer4_IRQHandler PROC
|
||||||
|
|
||||||
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, #8 ;if(Switchstate == 8)
|
||||||
BEQ SETBarrette1 ; {DriverReg(Barette1)}
|
BEQ ResetSwitchState
|
||||||
SETBarrette2
|
B SetLED
|
||||||
LDR R0, =Barette2 ;else {DriverReg(Barette2)} Adresse Jeu de led 2 : Argument
|
ResetSwitchState ;Switchstate = 0
|
||||||
MOV R3, #0;
|
MOV R3, #0;
|
||||||
STRB R3,[R2] ;On remet la donnée
|
|
||||||
B GoToDriverReg
|
B GoToDriverReg
|
||||||
SETBarrette1
|
SetLED
|
||||||
LDR R0, =Barette1 ;Adresse Jeu de led 1 : Argument
|
LDR R0,=mire ;tempMire
|
||||||
MOV R3, #1;
|
MOV R1,#48
|
||||||
STRB R3,[R2] ;On remet la donnée
|
MLA R0,R1,R3,R0 ;tempMire += (48*Switchstate)
|
||||||
GoToDriverReg
|
GoToDriverReg
|
||||||
BL DriverReg ;DriverReg(Barette3)
|
ADD R3, R3, #1 ;Switchstate++
|
||||||
|
STRB R3,[R2] ;On remet la donnée
|
||||||
|
BL DriverReg ;DriverReg(mire+Switchstate)
|
||||||
LDR R0,=TIM4_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
|
LDR R1, [R0] ;On lit le flag dans SR
|
||||||
AND R1, #~(1<<0) ;Reset le flag de UIF
|
AND R1, #~(1<<0) ;Reset le flag de UIF
|
||||||
|
|
Loading…
Add table
Reference in a new issue