diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s index 8a75b7a..045a1eb 100644 --- a/soft/PjtKEIL_StepSon/Src/GestionSon.s +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s @@ -11,9 +11,15 @@ area maram,data,readwrite +SortieSon dcw 0 +indexTab dcd 0 + ; =============================================================================================== - + EXPORT CallbackSon; + EXPORT SortieSon; + EXTERN LongueurSon; + EXTERN Son; @@ -21,7 +27,33 @@ area moncode,code,readonly ; écrire le code ici +CallbackSon proc + LDR r0,=SortieSon + LDR r1,=Son + LDR r3,=indexTab + push {r4} + push {r5} + push {r6} + + LDR r6,[r3] ; dans r6 la valeur de indextab + LDRSH r4,[r1,r6] ; dans r4 l'adresse de son[r6] + mov r5,r4 ; dans r5 la valeur de son [r6] + + ADD r5,r5,#32768 + MOV r2,#720 + MUL r5,r2,r5 + LSR r5,r5,#16 + + STR r5,[r0] ; dans sortieson la valeur de son[index] + add r6,r6,#1 + STR r6,[r3] + + pop {r6} + pop {r5} + pop {r4} + BX lr + endp diff --git a/soft/PjtKEIL_StepSon/Src/principal.c b/soft/PjtKEIL_StepSon/Src/principal.c index d09be75..421a6ae 100644 --- a/soft/PjtKEIL_StepSon/Src/principal.c +++ b/soft/PjtKEIL_StepSon/Src/principal.c @@ -1,7 +1,7 @@ #include "DriverJeuLaser.h" - +void CallbackSon(void); int main(void) @@ -15,9 +15,9 @@ int main(void) CLOCK_Configure(); +Timer_1234_Init_ff( TIM4, 91.0f*10e-6/(1.0f/72.0f*10e-6)); - - +Active_IT_Debordement_Timer( TIM4, 2, CallbackSon ); //============================================================================ diff --git a/soft/PjtKEIL_StepSon/StepSon.uvoptx b/soft/PjtKEIL_StepSon/StepSon.uvoptx index a13d7da..a3f9648 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,65 @@ -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 + 39 + 1 +
134219974
+ 0 + 0 + 0 + 0 + 0 + 1 + .\Src\GestionSon.s + + \\StepSon\Src/GestionSon.s\39 +
+ + 1 + 0 + 41 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\Src\GestionSon.s + + +
+
+ + + 0 + 1 + r5,0x0A + + + 1 + 1 + r4,0x0A + + + 2 + 1 + r6 + + + + + 1 + 0 + 0x00000F0C + 0 + + 0 @@ -174,7 +232,7 @@ 0 0 0 - 0 + 1 0 0 0 @@ -199,8 +257,8 @@ 0 - ((portb & 0x00000002) >> 1 & 0x2) >> 1 - FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008 + `SortieSon + 008000000000000000000000000000000000894000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000001000000000000000000F03F150000000000000000000000000000000000000094080008 @@ -460,7 +518,7 @@ 1 0 - 1 + 0 18 @@ -666,6 +724,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