diff --git a/soft/PjtKEIL_StepDFT/Src/DFT.s b/soft/PjtKEIL_StepDFT/Src/DFT.s index 3f6b5d4..6034fd6 100644 --- a/soft/PjtKEIL_StepDFT/Src/DFT.s +++ b/soft/PjtKEIL_StepDFT/Src/DFT.s @@ -5,6 +5,8 @@ ; ====================== zone de réservation de données, ====================================== ;Section RAM (read only) : area mesdata,data,readonly + IMPORT LeSignal + export DFT_ModuleAuCarre ;Section RAM (read write): @@ -22,7 +24,36 @@ ; écrire le code ici - +DFT_ModuleAuCarre proc + + + + push{r4,r7,r5} + ;r0 = @signal + ;r1 = k + ldr r2,=TabCos;@tabcos + mov r3,#0 ; r3 val indice + mov r5,#0 ; initialiser somme + +boucle + ldrh r7,[r0,r3 lsl 1];val signal format 1.12 + mul r4,r3,r1 ; val p=k*n (indice tabCos) + ldrsh r4,[r2,r4 lsl 1];val tabCos format 1.15(signed) + mul r7,r4; X(k) à l'indice n ==>format 2.27 + add r5,r7 + + add r3,#1 + cmp r3,#63 + ble boucle + + mov r0,r5 + + + + pop{r4,r7,r5} + bx lr + + endp ;Section ROM code (read only) : diff --git a/soft/PjtKEIL_StepDFT/Src/principal.c b/soft/PjtKEIL_StepDFT/Src/principal.c index d09be75..8290ba7 100644 --- a/soft/PjtKEIL_StepDFT/Src/principal.c +++ b/soft/PjtKEIL_StepDFT/Src/principal.c @@ -1,8 +1,8 @@ - #include "DriverJeuLaser.h" - +extern int DFT_ModuleAuCarre( short int * Signal64ech, char k); +extern short int LeSignal[]; int main(void) { @@ -15,6 +15,7 @@ int main(void) CLOCK_Configure(); +DFT_ModuleAuCarre(&(LeSignal[0]),1); @@ -23,6 +24,7 @@ CLOCK_Configure(); while (1) { + } } diff --git a/soft/PjtKEIL_StepDFT/StepDFT.uvoptx b/soft/PjtKEIL_StepDFT/StepDFT.uvoptx index 0d72cfc..3d34c52 100644 --- a/soft/PjtKEIL_StepDFT/StepDFT.uvoptx +++ b/soft/PjtKEIL_StepDFT/StepDFT.uvoptx @@ -75,7 +75,7 @@ 1 0 - 0 + 1 18 @@ -153,7 +153,64 @@ -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 + 31 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\Src\DFT.s + + +
+ + 1 + 0 + 33 + 1 +
134218386
+ 0 + 0 + 0 + 0 + 0 + 1 + .\Src\DFT.s + + \\StepDFT\Src/DFT.s\33 +
+ + 2 + 0 + 34 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + .\Src\DFT.s + + +
+
+ + + 1 + 9 + 0x08000330 + 0 + + 0 @@ -267,7 +324,7 @@ 1 0 - 1 + 0 18 @@ -624,6 +681,30 @@ 0 0 + + 1 + 2 + 2 + 0 + 0 + 0 + .\Src\DFT.s + DFT.s + 0 + 0 + + + 1 + 3 + 2 + 0 + 0 + 0 + .\Src\Signal.asm + Signal.asm + 0 + 0 + @@ -634,7 +715,7 @@ 0 2 - 2 + 4 2 0 0 @@ -654,7 +735,7 @@ 0 3 - 3 + 5 4 0 0 diff --git a/soft/PjtKEIL_StepDFT/StepDFT.uvprojx b/soft/PjtKEIL_StepDFT/StepDFT.uvprojx index 9031782..cec1044 100644 --- a/soft/PjtKEIL_StepDFT/StepDFT.uvprojx +++ b/soft/PjtKEIL_StepDFT/StepDFT.uvprojx @@ -388,6 +388,16 @@ 1 .\Src\principal.c + + DFT.s + 2 + .\Src\DFT.s + + + Signal.asm + 2 + .\Src\Signal.asm + @@ -797,6 +807,16 @@ 1 .\Src\principal.c + + DFT.s + 2 + .\Src\DFT.s + + + Signal.asm + 2 + .\Src\Signal.asm + @@ -1275,6 +1295,16 @@ 1 .\Src\principal.c + + DFT.s + 2 + .\Src\DFT.s + + + Signal.asm + 2 + .\Src\Signal.asm + @@ -1322,7 +1352,7 @@ - <Project Info> + StepDFT 0 1 diff --git a/soft/PjtKEIL_StepSon/Src/GestionSon.s b/soft/PjtKEIL_StepSon/Src/GestionSon.s index df0cd2c..7e375aa 100644 --- a/soft/PjtKEIL_StepSon/Src/GestionSon.s +++ b/soft/PjtKEIL_StepSon/Src/GestionSon.s @@ -44,9 +44,11 @@ CallbackSon proc ldr r0, =Son ; recuperer @ son + ;ldrsh r2,[r0,r2 lsl 1] movs r2,r2,lsl #1 add r0,r2 ldrsh r2,[r0];valeur son + ldr r0, =SortieSon ;@ sortie son