forked from acco/chti23
TP2fini
This commit is contained in:
parent
739aba2f09
commit
877253db14
3 changed files with 37 additions and 16 deletions
|
@ -173,9 +173,9 @@
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>1</Number>
|
<Number>1</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>56</LineNumber>
|
<LineNumber>51</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>1</EnabledFlag>
|
||||||
<Address>134220362</Address>
|
<Address>134220352</Address>
|
||||||
<ByteObject>0</ByteObject>
|
<ByteObject>0</ByteObject>
|
||||||
<HtxType>0</HtxType>
|
<HtxType>0</HtxType>
|
||||||
<ManyObjects>0</ManyObjects>
|
<ManyObjects>0</ManyObjects>
|
||||||
|
@ -184,7 +184,23 @@
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
<Filename>.\Src\Cligno.s</Filename>
|
<Filename>.\Src\Cligno.s</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression>\\BacASable\Src/Cligno.s\56</Expression>
|
<Expression>\\BacASable\Src/Cligno.s\51</Expression>
|
||||||
|
</Bp>
|
||||||
|
<Bp>
|
||||||
|
<Number>2</Number>
|
||||||
|
<Type>0</Type>
|
||||||
|
<LineNumber>59</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>.\Src\Cligno.s</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
|
|
|
@ -48,23 +48,28 @@ FlagCligno dcb 0
|
||||||
|
|
||||||
timer_callback proc
|
timer_callback proc
|
||||||
|
|
||||||
|
push {lr}
|
||||||
ldr r1,=FlagCligno ;
|
ldr r1,=FlagCligno ;
|
||||||
|
|
||||||
cmp r1,#0x1 ; si r1(FlagCligno) == 1, on continue.
|
cmp r1,#0 ; si r1(FlagCligno) == 0, on continue.
|
||||||
bne L0 ; sinon break to L0
|
beq L0 ;
|
||||||
mov r2, #0x0 ; copie valeur "0" dans r2
|
cmp r1,#0 ; si r1(FlagCligno) == 0, on continue.
|
||||||
str r2, [r1] ; la valeur 32bits contenue dans r2 est copiée en RAM à l'adresse spécifiée dans r1
|
bne L1 ; sinon break to L1
|
||||||
mov r0, #1 ; GPIOB_Set(r0 = "1")
|
|
||||||
bl GPIOB_Set
|
|
||||||
bx lr
|
|
||||||
|
|
||||||
L0
|
L0
|
||||||
mov r2, #0x1
|
mov r2, #1
|
||||||
str r2, [r1]
|
str r2, [r1]
|
||||||
mov r0, #1 ; GPIOB_Clear("1")
|
mov r0, #1 ; GPIOB_Clear("1")
|
||||||
bl GPIOB_Clear
|
bl GPIOB_Clear
|
||||||
|
pop {pc}
|
||||||
|
|
||||||
|
L1
|
||||||
|
mov r2, #0 ; copie valeur "0" dans r2
|
||||||
|
str r2, [r1] ; la valeur 32bits contenue dans r2 est copiée en RAM à l'adresse spécifiée dans r1
|
||||||
|
mov r0, #1 ; GPIOB_Set(r0 = "1")
|
||||||
|
bl GPIOB_Set
|
||||||
|
pop {pc}
|
||||||
|
|
||||||
bx lr
|
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@ CLOCK_Configure();
|
||||||
//** Placez votre code là ** //
|
//** Placez votre code là ** //
|
||||||
|
|
||||||
Timer_1234_Init_ff(TIM4, 7200000);
|
Timer_1234_Init_ff(TIM4, 7200000);
|
||||||
Active_IT_Debordement_Timer(TIM4, 2, timer_callback);
|
|
||||||
|
|
||||||
// Activation des interruptions issues du Timer 4
|
// Activation des interruptions issues du Timer 4
|
||||||
// Association de la fonction à exécuter lors de l'interruption : timer_callback
|
// Association de la fonction à exécuter lors de l'interruption : timer_callback
|
||||||
// cette fonction (si écrite en ASM) doit être conforme à l'AAPCS
|
// cette fonction (si écrite en ASM) doit être conforme à l'AAPCS
|
||||||
|
|
||||||
//** Placez votre code là ** //
|
//** Placez votre code là ** //
|
||||||
|
Active_IT_Debordement_Timer(TIM4, 2, timer_callback);
|
||||||
|
|
||||||
|
|
||||||
// configuration de PortB.1 (PB1) en sortie push-pull
|
// configuration de PortB.1 (PB1) en sortie push-pull
|
||||||
|
|
Loading…
Reference in a new issue