diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index 8a75b7a..f8b2761 100644
--- a/soft/PjtKEIL_StepSon/Src/GestionSon.s
+++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s
@@ -10,21 +10,54 @@
;Section RAM (read write):
area maram,data,readwrite
-
+SortieSon dcw 0
+index dcd 0
; ===============================================================================================
-
+ EXPORT CallbackSon ;
+ EXTERN bruitverre ;
+ EXTERN Son ;
+ EXTERN LongueurSon ;
+ EXPORT SortieSon ; //pour evaluer la variable lors des tests
+
;Section ROM code (read only) :
area moncode,code,readonly
; écrire le code ici
-
-
-
-
-
+CallbackSon
+ ldr r1, =index
+ ldr r2, [r1]
+ ldr r3, =Son
+ push {r6}
+ ldr r6, LongueurSon
+
+ cmp r2, r6
+ ble notEqual
+ pop {r6}
+
+notEqual
+ mov r6, #2
+ mul r6, r2
+ LDRSH r0, [r3, r6]
+ add r0, #32768
+ push {r4}
+ mov r4, #719
+ mul r0, r4
+ mov r4, #65535
+ udiv r0, r4
+ push {r7}
+ ldr r7, =SortieSon
+ str r0, [r7]
+ pop {r7}
+
+ add r2, #1
+ push {r5}
+ ldr r5, =index
+ str r2, [r5]
+ pop {r5}
+ pop {r4}
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..be96e06 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,7 +14,9 @@ int main(void)
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
CLOCK_Configure();
-
+//** Notre code là ** //
+Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
+Timer_1234_Init_ff( TIM4, 6552);
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index a13d7da..80a86dc 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
@@ -153,7 +153,46 @@
-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
+ 30
+ 1
+ 134219960
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\30
+
+
+
+
+ 0
+ 1
+ SortieSon,0x0A
+
+
+ 1
+ 1
+ r6,0x0A
+
+
+ 2
+ 1
+ r3,0x0A
+
+
+ 3
+ 1
+ r0,0x0A
+
+
0
@@ -460,7 +499,7 @@
1
0
- 1
+ 0
18
@@ -666,6 +705,38 @@
+
+ Son
+ 1
+ 0
+ 0
+ 0
+
+ 4
+ 4
+ 2
+ 0
+ 0
+ 0
+ .\Src\bruitverre.asm
+ bruitverre.asm
+ 0
+ 0
+
+
+ 4
+ 5
+ 2
+ 0
+ 0
+ 0
+ .\Src\GestionSon.s
+ GestionSon.s
+ 0
+ 0
+
+
+
::CMSIS
0
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvprojx b/soft/PjtKEIL_StepSon/StepSon.uvprojx
index d0b5c10..2849fe6 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
@@ -410,6 +410,21 @@
+
+ Son
+
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
+
+
::CMSIS
@@ -819,6 +834,21 @@
+
+ Son
+
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
+
+
::CMSIS
@@ -897,7 +927,7 @@
CibleSondeST
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::.\ARMCC
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
0
@@ -1297,6 +1327,21 @@
+
+ Son
+
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
+
+
::CMSIS
@@ -1322,12 +1367,7 @@
- <Project Info>
-
-
-
-
-
+ StepSon
0
1