diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index 8a75b7a..88c68cd 100644
--- a/soft/PjtKEIL_StepSon/Src/GestionSon.s
+++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s
@@ -1,6 +1,6 @@
PRESERVE8
THUMB
-
+ include ../Driver/DriverJeuLaser.inc
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
@@ -10,7 +10,15 @@
;Section RAM (read write):
area maram,data,readwrite
-
+index dcd 5512
+SortieSon dcw 0
+
+ export index
+ export SortieSon
+ export Callbackson
+
+ extern Son
+ extern LongueurSon
; ===============================================================================================
@@ -21,10 +29,40 @@
area moncode,code,readonly
; écrire le code ici
+ ;r0 Son
+ ;r1 Index
+ ;r2 Adresse index
+ ;r3 Pour les calculs
+
+Callbackson
+
+ ldr r2, =index
+ ldr r1, [r2]
+
+ ldr r0, =Son
+
+ ldr r3, =LongueurSon
+
+ cmp r1, r3
+ bne Conversion
+
+ mov r0, #0
+
+
+Conversion
+
+ add r0, #32768
+ mov r3, #719
+ mul r0, r3
+ mov r3, #65535
+ udiv r0, r3
+
+
+ add r1, #1
+ str r1, [r2]
+
+ ldr r3, =SortieSon
+ str r3,[r0]
-
-
-
-
END
\ No newline at end of file
diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c
index d09be75..58e7590 100644
--- a/soft/PjtKEIL_StepSon/Src/principal.c
+++ b/soft/PjtKEIL_StepSon/Src/principal.c
@@ -2,7 +2,7 @@
#include "DriverJeuLaser.h"
-
+void Callbackson(void);
int main(void)
{
@@ -14,8 +14,11 @@ int main(void)
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
CLOCK_Configure();
-
+Timer_1234_Init_ff(TIM4,6552);
+GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
+
+Active_IT_Debordement_Timer(TIM4, 2, Callbackson);
//============================================================================
@@ -23,6 +26,7 @@ CLOCK_Configure();
while (1)
{
+
}
}
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index a13d7da..f79fe1f 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvoptx
+++ b/soft/PjtKEIL_StepSon/StepSon.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
- 0
+ 1
18
@@ -460,7 +460,7 @@
1
0
- 1
+ 0
18
@@ -616,7 +616,7 @@
1
1
1
- 0
+ 1
0
0
.\Src\principal.c
@@ -624,6 +624,18 @@
0
0
+
+ 1
+ 2
+ 2
+ 0
+ 0
+ 0
+ .\Src\GestionSon.s
+ GestionSon.s
+ 0
+ 0
+
@@ -634,7 +646,7 @@
0
2
- 2
+ 3
2
0
0
@@ -654,7 +666,7 @@
0
3
- 3
+ 4
4
0
0
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvprojx b/soft/PjtKEIL_StepSon/StepSon.uvprojx
index d0b5c10..877ff9a 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvprojx
+++ b/soft/PjtKEIL_StepSon/StepSon.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
@@ -388,6 +388,11 @@
1
.\Src\principal.c
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
@@ -797,6 +802,11 @@
1
.\Src\principal.c
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
@@ -1275,6 +1285,11 @@
1
.\Src\principal.c
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
@@ -1322,12 +1337,7 @@
- <Project Info>
-
-
-
-
-
+ StepSon
0
1