diff --git a/soft/PjtKEIL_StepDeb_1/BacASable.uvoptx b/soft/PjtKEIL_StepDeb_1/BacASable.uvoptx
index ed76561..c673679 100644
--- a/soft/PjtKEIL_StepDeb_1/BacASable.uvoptx
+++ b/soft/PjtKEIL_StepDeb_1/BacASable.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
- 1
+ 0
18
@@ -153,7 +153,39 @@
-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
+ 27
+ 1
+ 134218678
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\principal.c
+
+ \\BacASable\Src/principal.c\27
+
+
+
+
+ 0
+ 1
+ VarTime
+
+
+
+
+ 1
+ 0
+ 0x20000000
+ 0
+
+
0
@@ -174,7 +206,7 @@
0
0
0
- 0
+ 1
0
0
0
@@ -196,6 +228,13 @@
+
+
+ 0
+ `VarTime
+ 0080000000000000000000000000000080842E410000000000000000000000000000000056617254696D65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000001000000000000000000F03F0100000000000000000000000000000000000000B6030008
+
+
1
0
@@ -260,7 +299,7 @@
1
0
- 0
+ 1
18
@@ -338,12 +377,29 @@
-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
+ 54
+ 1
+ 134218716
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\Delay.s
+
+ \\BacASable\Src/Delay.s\54
+
+
1
257
- r0
+ 0x20000000
0
@@ -367,7 +423,7 @@
0
0
0
- 0
+ 1
0
0
0
@@ -609,7 +665,7 @@
1
1
1
- 1
+ 0
0
0
.\Src\principal.c
diff --git a/soft/PjtKEIL_StepDeb_1/BacASable.uvprojx b/soft/PjtKEIL_StepDeb_1/BacASable.uvprojx
index 9c192f5..e7a5ede 100644
--- a/soft/PjtKEIL_StepDeb_1/BacASable.uvprojx
+++ b/soft/PjtKEIL_StepDeb_1/BacASable.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
@@ -1338,11 +1338,6 @@
<Project Info>
-
-
-
-
-
0
1
diff --git a/soft/PjtKEIL_StepDeb_1/Src/Delay.s b/soft/PjtKEIL_StepDeb_1/Src/Delay.s
index bf49175..0a60938 100644
--- a/soft/PjtKEIL_StepDeb_1/Src/Delay.s
+++ b/soft/PjtKEIL_StepDeb_1/Src/Delay.s
@@ -12,7 +12,7 @@
VarTime dcd 0
-
+ EXPORT VarTime
; ===============================================================================================
;constantes (équivalent du #define en C)
diff --git a/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx b/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
index f1315bb..7916199 100644
--- a/soft/PjtKEIL_StepDeb_2/BacASable.uvoptx
+++ b/soft/PjtKEIL_StepDeb_2/BacASable.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
- 1
+ 0
18
@@ -174,7 +174,7 @@
0
0
0
- 0
+ 1
0
0
0
@@ -200,7 +200,7 @@
0
((portb & 0x00000002) >> 1 & 0x2) >> 1
- FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008
+ 00800000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F1600000000000000000000000000000000000000080A0008
@@ -267,7 +267,7 @@
1
0
- 0
+ 1
18
@@ -374,7 +374,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 d99d0f0..f01d9e2 100644
--- a/soft/PjtKEIL_StepDeb_2/BacASable.uvprojx
+++ b/soft/PjtKEIL_StepDeb_2/BacASable.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
@@ -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
@@ -1338,11 +1338,6 @@
<Project Info>
-
-
-
-
-
0
1
diff --git a/soft/PjtKEIL_StepDeb_2/Src/Cligno.s b/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
index 8a75b7a..7ca6af0 100644
--- a/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
+++ b/soft/PjtKEIL_StepDeb_2/Src/Cligno.s
@@ -1,7 +1,8 @@
PRESERVE8
THUMB
-
+ include Driver/DriverJeuLaser.inc
+ export timer_callback;
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
area mesdata,data,readonly
@@ -10,7 +11,7 @@
;Section RAM (read write):
area maram,data,readwrite
-
+FlagCligno dcb 0
; ===============================================================================================
@@ -21,10 +22,24 @@
area moncode,code,readonly
; écrire le code ici
-
-
-
-
-
-
- END
\ No newline at end of file
+timer_callback
+ push {LR};
+ ldr r3,=FlagCligno;
+ mov r0,#1;
+ mov r1,#1;
+ ldrb r2, [r3];
+ cmp r1, r2;
+ beq equal;
+;if FlagCligno==0
+ str r1,[r3];
+ bl GPIOB_Clear;
+ b final;
+;if FlagCligno==1
+equal
+ mov r1,#0;
+ str r1,[r3];
+ bl GPIOB_Set;
+ b final;
+final
+ pop {PC};
+ END
diff --git a/soft/PjtKEIL_StepDeb_2/Src/principal.c b/soft/PjtKEIL_StepDeb_2/Src/principal.c
index 4d726a1..655c031 100644
--- a/soft/PjtKEIL_StepDeb_2/Src/principal.c
+++ b/soft/PjtKEIL_StepDeb_2/Src/principal.c
@@ -1,11 +1,9 @@
#include "DriverJeuLaser.h"
+extern void timer_callback(void);
-void timer_callback(void);
-
-int main(void)
-{
+int main(void){
// ===========================================================================
// ============= INIT PERIPH (faites qu'une seule fois) =====================
@@ -18,6 +16,7 @@ CLOCK_Configure();
//** Placez votre code là ** //
+Timer_1234_Init_ff(TIM4, 7200000);
// Activation des interruptions issues du Timer 4
@@ -25,6 +24,7 @@ CLOCK_Configure();
// cette fonction (si écrite en ASM) doit être conforme à l'AAPCS
//** Placez votre code là ** //
+Active_IT_Debordement_Timer(TIM4, 2, timer_callback);
@@ -42,7 +42,7 @@ while (1)
}
}
-char FlagCligno;
+/*char FlagCligno;
void timer_callback(void)
{
@@ -57,5 +57,5 @@ void timer_callback(void)
GPIOB_Clear(1);
}
-}
+}*/
diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s
index 8a75b7a..987363b 100644
--- a/soft/PjtKEIL_StepSon/Src/GestionSon.s
+++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s
@@ -1,7 +1,8 @@
PRESERVE8
THUMB
-
+ export callback_son;
+ extern Son;
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
area mesdata,data,readonly
@@ -10,8 +11,8 @@
;Section RAM (read write):
area maram,data,readwrite
-
-
+sortieSon dcd 0
+index dcd 0
; ===============================================================================================
@@ -21,10 +22,19 @@
area moncode,code,readonly
; écrire le code ici
-
-
-
-
-
-
+callback_son
+ push{lr,r4};
+ ldr r0, =index;
+ ldr r4, [r0];
+ ldr r1, =sortieSon;
+ ldr r2, =Son;
+ ldrsh r3, [r2, r4,lsl #1];
+ add r4, #1;
+ str r4, [r0];
+ add r3, #32768;
+ mov r0, #720;
+ mul r3, r3, r0;
+ lsr r3, #16;
+ str r3, [r1];
+ pop{pc,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..f9ae64a 100644
--- a/soft/PjtKEIL_StepSon/Src/principal.c
+++ b/soft/PjtKEIL_StepSon/Src/principal.c
@@ -1,8 +1,7 @@
-
#include "DriverJeuLaser.h"
-
+extern void callback_son(void);
int main(void)
{
@@ -13,9 +12,8 @@ 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, callback_son);
//============================================================================
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx
index a13d7da..6876778 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,32 @@
-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
+ 26
+ 1
+ 134219960
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Src\GestionSon.s
+
+ \\StepSon\Src/GestionSon.s\26
+
+
+
+
+ 1
+ 266
+ 0x200000a0
+ 0
+
+
0
@@ -200,7 +225,7 @@
0
((portb & 0x00000002) >> 1 & 0x2) >> 1
- FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008
+ FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F150000000000000000000000000000000000000096020008
@@ -460,7 +485,7 @@
1
0
- 1
+ 0
18
@@ -666,6 +691,38 @@
+
+ Son
+ 1
+ 0
+ 0
+ 0
+
+ 4
+ 4
+ 2
+ 0
+ 0
+ 0
+ .\Src\GestionSon.s
+ GestionSon.s
+ 0
+ 0
+
+
+ 4
+ 5
+ 2
+ 0
+ 0
+ 0
+ .\Src\bruitverre.asm
+ bruitverre.asm
+ 0
+ 0
+
+
+
::CMSIS
0
diff --git a/soft/PjtKEIL_StepSon/StepSon.uvprojx b/soft/PjtKEIL_StepSon/StepSon.uvprojx
index d0b5c10..aa24a2f 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
+
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
+
+
::CMSIS
@@ -819,6 +834,21 @@
+
+ Son
+
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
+
+
::CMSIS
@@ -1297,6 +1327,21 @@
+
+ Son
+
+
+ GestionSon.s
+ 2
+ .\Src\GestionSon.s
+
+
+ bruitverre.asm
+ 2
+ .\Src\bruitverre.asm
+
+
+
::CMSIS
@@ -1322,12 +1367,7 @@
- <Project Info>
-
-
-
-
-
+ StepSon
0
1