diff --git a/soft/PjtKEIL_StepDeb_1/BacASable.uvoptx b/soft/PjtKEIL_StepDeb_1/BacASable.uvoptx
index ed76561..6052e22 100644
--- a/soft/PjtKEIL_StepDeb_1/BacASable.uvoptx
+++ b/soft/PjtKEIL_StepDeb_1/BacASable.uvoptx
@@ -10,7 +10,7 @@
*.s*; *.src; *.a*
*.obj; *.o
*.lib
- *.txt; *.h; *.inc
+ *.txt; *.h; *.inc; *.md
*.plm
*.cpp
0
@@ -75,7 +75,7 @@
1
0
- 1
+ 0
18
@@ -153,7 +153,55 @@
-U066CFF574857847167074929 -O2254 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM)
-
+
+
+ 0
+ 0
+ 56
+ 1
+ 134218716
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\Delay.s
+
+ \\BacASable\Src/Delay.s\56
+
+
+ 1
+ 0
+ 58
+ 1
+ 134218718
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\Delay.s
+
+ \\BacASable\Src/Delay.s\58
+
+
+
+
+ 0
+ 1
+ VarTime
+
+
+
+
+ 1
+ 260
+ 0x20000000
+ 0
+
+
0
@@ -196,6 +244,13 @@
+
+
+ 0
+ ((portb & 0x00000002) >> 1 & 0x2) >> 1
+ FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F0B00000000000000000000000000000000000000DE030008
+
+
1
0
@@ -260,7 +315,7 @@
1
0
- 0
+ 1
18
diff --git a/soft/PjtKEIL_StepDeb_1/BacASable.uvprojx b/soft/PjtKEIL_StepDeb_1/BacASable.uvprojx
index 9c192f5..2318c0c 100644
--- a/soft/PjtKEIL_StepDeb_1/BacASable.uvprojx
+++ b/soft/PjtKEIL_StepDeb_1/BacASable.uvprojx
@@ -10,7 +10,7 @@
Simu
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::.\ARMCC
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
0
@@ -424,7 +424,7 @@
CibleSondeKEIL
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::.\ARMCC
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
0
@@ -1338,11 +1338,6 @@
<Project Info>
-
-
-
-
-
0
1
diff --git a/soft/PjtKEIL_StepDeb_1/Src/Delay.s b/soft/PjtKEIL_StepDeb_1/Src/Delay.s
index bf49175..1d346a8 100644
--- a/soft/PjtKEIL_StepDeb_1/Src/Delay.s
+++ b/soft/PjtKEIL_StepDeb_1/Src/Delay.s
@@ -11,6 +11,8 @@
area maram,data,readwrite
VarTime dcd 0
+
+ EXPORT VarTime
; ===============================================================================================
@@ -23,7 +25,7 @@ TimeValue equ 900000
;Section ROM code (read only) :
- area moncode,code,readonly
+ area moncode,code,readonly
@@ -41,19 +43,19 @@ TimeValue equ 900000
Delay_100ms proc
- ldr r0,=VarTime
+ ldr r0,=VarTime ; r0=VarTime=0; l'adresse de r0=0x20000000 (c'est linker qui décide ou stocké r0)
- ldr r1,=TimeValue
- str r1,[r0]
+ ldr r1,=TimeValue ; r1=TimeValue=900000; l'adresse de r1=0x000DBBA0
+ str r1,[r0] ; la valeur de r1 stocké à l'adresse de r0=0x20000000
BoucleTempo
- ldr r1,[r0]
+ ldr r1,[r0] ; r1=r0=900000
- subs r1,#1
- str r1,[r0]
- bne BoucleTempo
+ subs r1,#1 ; r1=r1-1=899999
+ str r1,[r0]; la valeur de r1 stocké à l'adresse de r0=0x20000000
+ bne BoucleTempo ; si z!=0 reboucler (z=1 si r0=0)
- bx lr
+ bx lr ; return r0
endp
diff --git a/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx b/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
index f1315bb..0f4196b 100644
--- a/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
+++ b/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
@@ -10,7 +10,7 @@
*.s*; *.src; *.a*
*.obj; *.o
*.lib
- *.txt; *.h; *.inc
+ *.txt; *.h; *.inc; *.md
*.plm
*.cpp
0
@@ -153,7 +153,40 @@
-U066CFF574857847167074929 -O2254 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM)
-
+
+
+ 0
+ 0
+ 16
+ 1
+ 134220296
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\principal.c
+
+ \\BacASable\Src/principal.c\16
+
+
+ 1
+ 0
+ 55
+ 1
+ 134220362
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\Cligno.s
+
+ \\BacASable\Src/Cligno.s\55
+
+
0
@@ -174,7 +207,7 @@
0
0
0
- 0
+ 1
0
0
0
@@ -200,7 +233,7 @@
0
((portb & 0x00000002) >> 1 & 0x2) >> 1
- FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008
+ FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F0D0000000000000000000000000000000000000096020008
diff --git a/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx b/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx
index d99d0f0..2c5376a 100644
--- a/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx
+++ b/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx
@@ -10,7 +10,7 @@
Simu
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::.\ARMCC
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
0
@@ -357,7 +357,7 @@
-
+ .\Driver
@@ -1338,11 +1338,6 @@
<Project Info>
-
-
-
-
-
0
1
diff --git a/soft/PjtKEIL_StepDeb_2/Src/Cligno.s b/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
index 8a75b7a..8b1b937 100644
--- a/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
+++ b/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
@@ -9,19 +9,68 @@
;Section RAM (read write):
area maram,data,readwrite
+FlagCligno dcb 0
-
+ export FlagCligno
+ export timer_callback
; ===============================================================================================
+; char FlagCligno;
+;void timer_callback(void)
+;{
+; if (FlagCligno==1)
+; {
+; FlagCligno=0;
+; GPIOB_Set(1);
+; }
+; else
+; {
+; FlagCligno=1;
+; GPIOB_Clear(1);
+; }
+;
+;}
;Section ROM code (read only) :
area moncode,code,readonly
; écrire le code ici
-
-
+ include DriverJeuLaser.inc
+
+; r0 : l'adress de FlagCligno
+; r1 :
+; r2 : valeur du flag
+
+timer_callback proc
+ push {lr}
+ ldr r0,=FlagCligno ; mets l'adresse de FlagCligno dans r0
+ ldr r2, [r0] ; mets dans r2 la valeur du flag
+ cbz r2, alors ; FlagCligno = 0 => Mise a 1
+ cbnz r2, sinon ; FlagCligno = 1 => Mise a 0
+
+alors
+ ; mets FlagCligno a 1
+ mov r2, #0x1
+ str r2, [r0]
+ ; GPIOB_Clear(1)
+ mov r1, #1
+ bl GPIOB_Clear
+
+
+sinon
+ ; mets FlagCligno a 0
+ mov r2, #0x0
+ str r2, [r0]
+ ; GPIOB_Set(1)=
+ mov r1, #1
+ bl GPIOB_Set
+ pop {pc}
+ endp
+
+
+
diff --git a/soft/PjtKEIL_StepDeb_2/Src/principal.c b/soft/PjtKEIL_StepDeb_2/Src/principal.c
index 4d726a1..247c351 100644
--- a/soft/PjtKEIL_StepDeb_2/Src/principal.c
+++ b/soft/PjtKEIL_StepDeb_2/Src/principal.c
@@ -2,7 +2,8 @@
#include "DriverJeuLaser.h"
-void timer_callback(void);
+extern void timer_callback(void);
+
int main(void)
{
@@ -21,6 +22,8 @@ CLOCK_Configure();
// Activation des interruptions issues du Timer 4
+ Timer_1234_Init_ff(TIM4, 7200000);
+ Active_IT_Debordement_Timer(TIM4, 2, 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
@@ -42,20 +45,20 @@ while (1)
}
}
-char FlagCligno;
+// char FlagCligno;
-void timer_callback(void)
-{
- if (FlagCligno==1)
- {
- FlagCligno=0;
- GPIOB_Set(1);
- }
- else
- {
- FlagCligno=1;
- GPIOB_Clear(1);
- }
-
-}
+//void timer_callback(void)
+//{
+// if (FlagCligno==1)
+// {
+// FlagCligno=0;
+// GPIOB_Set(1);
+// }
+// else
+// {
+// FlagCligno=1;
+// GPIOB_Clear(1);
+// }
+//
+//}