diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index 88c68cd..cf8d389 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
+ include ../Driver/DriverJeuLaser.inc;
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
@@ -10,7 +10,7 @@
;Section RAM (read write):
area maram,data,readwrite
-index dcd 5512
+index dcd 0
SortieSon dcw 0
export index
@@ -39,17 +39,25 @@ Callbackson
ldr r2, =index
ldr r1, [r2]
- ldr r0, =Son
-
ldr r3, =LongueurSon
+ ldr r3, [r3]
- cmp r1, r3
- bne Conversion
-
- mov r0, #0
+ mov r0, #2
+ mul r3, r0
+
+ cmp r3, r1
+ bhs Conversion
+
+ mov r0,#0
+
+ b fin
Conversion
+
+ ldr r0, =Son
+ ldrsh r0, [r0,r1]
+
add r0, #32768
mov r3, #719
@@ -57,12 +65,19 @@ Conversion
mov r3, #65535
udiv r0, r3
-
- add r1, #1
+ add r1, #2
str r1, [r2]
+
+fin
+
+ push{lr, r2, r1, r0}
+ bl PWM_Set_Value_TIM3_Ch3
+ pop{lr, r2, r1, r0}
+
ldr r3, =SortieSon
- str r3,[r0]
-
-
- END
\ No newline at end of file
+ strh r0,[r3]
+
+ bx lr
+
+ END
diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c
index 58e7590..11d27c6 100644
--- a/soft/PjtKEIL_StepSon/Src/principal.c
+++ b/soft/PjtKEIL_StepSon/Src/principal.c
@@ -16,7 +16,9 @@ CLOCK_Configure();
Timer_1234_Init_ff(TIM4,6552);
-GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
+GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
+
+PWM_Init_ff(TIM3, 3, 720);
Active_IT_Debordement_Timer(TIM4, 2, Callbackson);
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index f79fe1f..fa075ec 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvoptx
+++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx
@@ -153,7 +153,24 @@
-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
+ 51
+ 1
+ 134220556
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\51
+
+
0
@@ -174,7 +191,7 @@
0
0
0
- 0
+ 1
0
0
0
@@ -199,8 +216,13 @@
0
- ((portb & 0x00000002) >> 1 & 0x2) >> 1
- FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008
+ `SortieSon
+ 008000000000000000000000000000000000894000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F1600000000000000000000000000000000000000080A0008
+
+
+ 1
+ ((portb & 0x00000001) & 0x1) >> 0
+ 00800000000000000000000000000000E0FFEF400100000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F1600000000000000000000000000000000000000B40A0008
@@ -636,6 +658,18 @@
0
0
+
+ 1
+ 3
+ 2
+ 0
+ 0
+ 0
+ .\Src\bruitverre.asm
+ bruitverre.asm
+ 0
+ 0
+
@@ -646,7 +680,7 @@
0
2
- 3
+ 4
2
0
0
@@ -666,7 +700,7 @@
0
3
- 4
+ 5
4
0
0
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvprojx b/soft/PjtKEIL_StepSon/StepSon.uvprojx
index 877ff9a..b5f2dde 100644
--- a/soft/PjtKEIL_StepSon/StepSon.uvprojx
+++ b/soft/PjtKEIL_StepSon/StepSon.uvprojx
@@ -393,6 +393,11 @@
2
.\Src\GestionSon.s
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
@@ -807,6 +812,11 @@
2
.\Src\GestionSon.s
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
@@ -1290,6 +1300,11 @@
2
.\Src\GestionSon.s
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+