From 9f57b9cc3ce4f59bd915c71cde8704f6093dd60d Mon Sep 17 00:00:00 2001 From: Alan Dutems Date: Tue, 18 Apr 2023 17:16:24 +0200 Subject: [PATCH] SonFin --- soft/PjtKEIL_StepSon/Src/GestionSon.h | 7 ++++ soft/PjtKEIL_StepSon/Src/GestionSon.s | 22 +++++++++-- soft/PjtKEIL_StepSon/Src/principal.c | 7 +++- soft/PjtKEIL_StepSon/StepSon.uvoptx | 53 ++++++++++++++------------- soft/PjtKEIL_StepSon/StepSon.uvprojx | 17 ++++++++- 5 files changed, 74 insertions(+), 32 deletions(-) create mode 100644 soft/PjtKEIL_StepSon/Src/GestionSon.h diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.h b/soft/PjtKEIL_StepSon/Src/GestionSon.h new file mode 100644 index 0000000..7666666 --- /dev/null +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.h @@ -0,0 +1,7 @@ +#ifndef GestionSon +#define GestionSon + +void Callbackson(void); +void StartSon(void); + +#endif \ No newline at end of file diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s index cf8d389..522c59f 100644 --- a/soft/PjtKEIL_StepSon/Src/GestionSon.s +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s @@ -16,6 +16,7 @@ SortieSon dcw 0 export index export SortieSon export Callbackson + export StartSon extern Son extern LongueurSon @@ -33,8 +34,18 @@ SortieSon dcw 0 ;r1 Index ;r2 Adresse index ;r3 Pour les calculs + + +StartSon proc -Callbackson + ldr r0, =index + mov r1, #0 + str r1,[r0] + + bx lr + endp + +Callbackson proc ldr r2, =index ldr r1, [r2] @@ -48,7 +59,7 @@ Callbackson cmp r3, r1 bhs Conversion - mov r0,#0 + mov r0,#-1 b fin @@ -76,8 +87,11 @@ fin pop{lr, r2, r1, r0} ldr r3, =SortieSon - strh r0,[r3] + str r0,[r3] bx lr + endp + - END + +END diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c index 11d27c6..f6b3cbc 100644 --- a/soft/PjtKEIL_StepSon/Src/principal.c +++ b/soft/PjtKEIL_StepSon/Src/principal.c @@ -1,8 +1,9 @@ #include "DriverJeuLaser.h" +#include "GestionSon.h" -void Callbackson(void); +extern int SortieSon; int main(void) { @@ -28,7 +29,9 @@ Active_IT_Debordement_Timer(TIM4, 2, Callbackson); while (1) { - + if (SortieSon==-1){ + StartSon(); + } } } diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx index fa075ec..e34f4da 100644 --- a/soft/PjtKEIL_StepSon/StepSon.uvoptx +++ b/soft/PjtKEIL_StepSon/StepSon.uvoptx @@ -75,7 +75,7 @@ 1 0 - 1 + 0 18 @@ -153,24 +153,15 @@ -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 -
-
+ + + + 1 + 257 + r0 + 0 + + 0 @@ -217,12 +208,12 @@ 0 `SortieSon - 008000000000000000000000000000000000894000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F1600000000000000000000000000000000000000080A0008 + 008000000000000000000000000000000000894000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F1500000000000000000000000000000000000000080A0008 1 ((portb & 0x00000001) & 0x1) >> 0 - 00800000000000000000000000000000E0FFEF400100000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F1600000000000000000000000000000000000000B40A0008 + 00800000000000000000000000000000E0FFEF400100000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F1500000000000000000000000000000000000000B40A0008 @@ -289,7 +280,7 @@ 1 0 - 0 + 1 18 @@ -396,7 +387,7 @@ 0 0 0 - 0 + 1 0 0 0 @@ -670,6 +661,18 @@ 0 0 + + 1 + 4 + 5 + 0 + 0 + 0 + .\Src\GestionSon.h + GestionSon.h + 0 + 0 + @@ -680,7 +683,7 @@ 0 2 - 4 + 5 2 0 0 @@ -700,7 +703,7 @@ 0 3 - 5 + 6 4 0 0 diff --git a/soft/PjtKEIL_StepSon/StepSon.uvprojx b/soft/PjtKEIL_StepSon/StepSon.uvprojx index b5f2dde..e5507c4 100644 --- a/soft/PjtKEIL_StepSon/StepSon.uvprojx +++ b/soft/PjtKEIL_StepSon/StepSon.uvprojx @@ -398,6 +398,11 @@ 2 .\Src\bruitverre.asm + + GestionSon.h + 5 + .\Src\GestionSon.h + @@ -429,7 +434,7 @@ CibleSondeKEIL 0x4 ARM-ADS - 5060750::V5.06 update 6 (build 750)::.\ARMCC + 5060960::V5.06 update 7 (build 960)::.\ARMCC 0 @@ -817,6 +822,11 @@ 2 .\Src\bruitverre.asm + + GestionSon.h + 5 + .\Src\GestionSon.h + @@ -1305,6 +1315,11 @@ 2 .\Src\bruitverre.asm + + GestionSon.h + 5 + .\Src\GestionSon.h +