diff --git a/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx b/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
index c0c92ae..bfcc4c9 100644
--- a/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
+++ b/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
@@ -75,7 +75,7 @@
1
0
- 1
+ 0
18
@@ -272,7 +272,7 @@
1
0
- 0
+ 1
18
@@ -379,7 +379,7 @@
0
0
0
- 0
+ 1
0
0
0
diff --git a/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx b/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx
index e77bfc6..f01d9e2 100644
--- a/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx
+++ b/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx
@@ -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
diff --git a/soft/PjtKEIL_StepDeb_2/Src/Cligno.s b/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
index c660c4e..9be62bd 100644
--- a/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
+++ b/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
@@ -1,7 +1,7 @@
PRESERVE8
THUMB
-include DriverJeuLaser.inc
+ include Driver/DriverJeuLaser.inc
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
@@ -23,22 +23,24 @@ FlagCligno dcd 0
; écrire le code ici
timer_callback proc
- push lr
+ push {lr}
mov r0,#1 ; r0 : constant = 1 (arg fonct GPIOB)
ldr r2,=FlagCligno ; r2 : addr de FlagCligno
- mov r1,[r2] ; r1 : valeur FlagCligno
+ ldr r1,[r2] ; r1 : valeur FlagCligno
cmp r1,#0
beq FC0
; if FlagCligno == 1
- str #0,[r2]
+ mov r3,#0
+ str r3,[r2]
bl GPIOB_Set
b fin
; if FlagCligno == 0
FC0
+ mov r3,#1
str r3,[r2]
bl GPIOB_Clear
fin
- pop pc
+ pop {pc}
endp
END
\ No newline at end of file
diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index 8a75b7a..a6cb9aa 100644
--- a/soft/PjtKEIL_StepSon/Src/GestionSon.s
+++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s
@@ -1,7 +1,8 @@
PRESERVE8
THUMB
-
+ include Driver/DriverJeuLaser.inc
+
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
area mesdata,data,readonly
@@ -10,18 +11,52 @@
;Section RAM (read write):
area maram,data,readwrite
-
+SortieSon dcw 0
+Index dcw 0
; ===============================================================================================
-
-
+ EXPORT SortieSon
+ EXPORT CallbackSon
+ IMPORT Son
+ IMPORT LongueurSon
;Section ROM code (read only) :
area moncode,code,readonly
; écrire le code ici
-
+CallbackSon proc
+ push {lr}
+ ldr r3,=Index
+ ldr r1,[r3]
+ ldr r0,=LongueurSon
+ ldr r2,[r0]
+ cmp r1,r2
+ beq FinSig
+ bge Fin
+; if index < longueur son
+ ldr r2,=Son ; r2 = @ debut son
+ ldr r0,[r2,r1]
+ add r0,#32768
+ mov r2,#720
+ mul r0,r2
+ lsr r0,#16
+ ldr r2,=SortieSon
+ str r0,[r2]
+ add r1,#1
+ str r1,[r3]
+ b Fin
+;if index = longueurSon
+FinSig
+ mov r0,#0
+ ldr r2,=SortieSon
+ str r0,[r2]
+ add r1,#1
+ str r1,[r3]
+; if index > longueurson
+Fin
+ pop {pc}
+ endp
diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c
index d09be75..1fcf648 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)
{
@@ -13,11 +13,12 @@ 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 );
-
+Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
+
+GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
//============================================================================
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index a13d7da..39bb201 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
@@ -154,13 +154,28 @@
+
+
+ 0
+ 1
+ SortieSon
+
+
+
+
+ 1
+ 257
+ r0
+ 0
+
+
0
0
1
- 1
+ 0
0
0
0
@@ -199,8 +214,8 @@
0
- ((portb & 0x00000002) >> 1 & 0x2) >> 1
- FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008
+ `SortieSon
+ 0080000000000000000000000000E0FFFFFFEF4100000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F0A00000000000000000000000000000000000000080A0008
@@ -360,7 +375,7 @@
0
1
- 1
+ 0
0
0
0
@@ -460,7 +475,7 @@
1
0
- 1
+ 0
18
@@ -608,7 +623,7 @@
Sources
- 1
+ 0
0
0
0
@@ -666,6 +681,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..33cf5aa 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
@@ -419,7 +434,7 @@
CibleSondeKEIL
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::.\ARMCC
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
0
@@ -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