diff --git a/soft/PjtKEIL_StepSon/GestionSon.h b/soft/PjtKEIL_StepSon/GestionSon.h
new file mode 100644
index 0000000..5abba1b
--- /dev/null
+++ b/soft/PjtKEIL_StepSon/GestionSon.h
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+void CallbackSon(void);
+void StartSon(void);
\ No newline at end of file
diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index 5e2087a..bcbc859 100644
--- a/soft/PjtKEIL_StepSon/Src/GestionSon.s
+++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s
@@ -4,6 +4,7 @@
export CallbackSon
export index
export SortieSon
+ export StartSon
import LongueurSon
import Son
import PWM_Set_Value_TIM3_Ch3
@@ -33,7 +34,7 @@ CallbackSon proc
ldr r4,=LongueurSon
ldr r4,[r4]
ldr r2,=index
- ldr r7,[r2]
+ ldr r7,[r2] ;r7 = valeur de index
cmp r4,r7
bne alors
@@ -71,4 +72,18 @@ finsi
bx lr
endp
- END
\ No newline at end of file
+StartSon proc
+ ldr r0,=index
+ ldr r1,[r0]
+ mov r1,#0
+ str r1,[r0]
+ bx lr
+ endp
+
+ END
+
+
+
+
+
+
diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c
index 75ab9e0..5bf388a 100644
--- a/soft/PjtKEIL_StepSon/Src/principal.c
+++ b/soft/PjtKEIL_StepSon/Src/principal.c
@@ -5,6 +5,8 @@
//extern u32 * PeriodeSonMicroSec;
extern void CallbackSon(void);
+extern void StartSon(void);
+int bouton=0;
int main(void)
@@ -29,6 +31,11 @@ Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
while (1)
{
+ if (bouton==1) {
+ StartSon();
+ bouton=0;
+
+ }
}
}
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index e071cc9..4504d12 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvoptx
+++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx
@@ -75,7 +75,7 @@
1
0
- 1
+ 0
18
@@ -153,40 +153,7 @@
-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
- 63
- 1
- 134220492
- 0
- 0
- 0
- 0
- 0
- 1
- .\Src\GestionSon.s
-
- \\StepSon\Src/GestionSon.s\63
-
-
- 1
- 0
- 32
- 1
- 134220448
- 0
- 0
- 0
- 0
- 0
- 1
- .\Src\GestionSon.s
-
- \\StepSon\Src/GestionSon.s\32
-
-
+
1
@@ -241,12 +208,12 @@
0
`SortieSon
- 008000000000000000000000000000000070864000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F150000000000000000000000000000000000000094080008
+ 008000000000000000000000000000000070864000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F090000000000000000000000000000000000000094080008
1
- ((portb & 0x00000001) & 0x1) >> 0
- 00008000000000000000000000000000E0FFEF400100000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F150000000000000000000000000000000000000092080008
+ (PORTB & 0x00000001)
+ 000080000000000000000000000000000000F03F0000000000000000000000000000000028504F52544220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F09000000000000000000000000000000000000008E0A0008
@@ -313,7 +280,7 @@
1
0
- 0
+ 1
18
@@ -420,7 +387,7 @@
0
0
0
- 0
+ 1
0
0
0
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvprojx b/soft/PjtKEIL_StepSon/StepSon.uvprojx
index c356ffc..20c738e 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvprojx
+++ b/soft/PjtKEIL_StepSon/StepSon.uvprojx
@@ -444,7 +444,7 @@
CibleSondeKEIL
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::.\ARMCC
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
0