This commit is contained in:
Bensebaa 2023-04-19 12:15:29 +02:00
parent 39515121e3
commit 0377860585
5 changed files with 155 additions and 9 deletions

View file

@ -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,9 +24,38 @@
; é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) :
AREA Trigo, DATA, READONLY
; codage fractionnaire 1.15

View file

@ -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)
{
}
}

View file

@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -153,7 +153,64 @@
<Name>-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)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>31</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\Src\DFT.s</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>33</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134218386</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Src\DFT.s</Filename>
<ExecCommand></ExecCommand>
<Expression>\\StepDFT\Src/DFT.s\33</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>34</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\Src\DFT.s</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
</Breakpoint>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>9</SubType>
<ItemText>0x08000330</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -267,7 +324,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -624,6 +681,30 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Src\DFT.s</PathWithFileName>
<FilenameWithoutPath>DFT.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Src\Signal.asm</PathWithFileName>
<FilenameWithoutPath>Signal.asm</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
@ -634,7 +715,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>2</FileNumber>
<FileNumber>4</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
@ -654,7 +735,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>3</FileNumber>
<FileNumber>5</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>

View file

@ -388,6 +388,16 @@
<FileType>1</FileType>
<FilePath>.\Src\principal.c</FilePath>
</File>
<File>
<FileName>DFT.s</FileName>
<FileType>2</FileType>
<FilePath>.\Src\DFT.s</FilePath>
</File>
<File>
<FileName>Signal.asm</FileName>
<FileType>2</FileType>
<FilePath>.\Src\Signal.asm</FilePath>
</File>
</Files>
</Group>
<Group>
@ -797,6 +807,16 @@
<FileType>1</FileType>
<FilePath>.\Src\principal.c</FilePath>
</File>
<File>
<FileName>DFT.s</FileName>
<FileType>2</FileType>
<FilePath>.\Src\DFT.s</FilePath>
</File>
<File>
<FileName>Signal.asm</FileName>
<FileType>2</FileType>
<FilePath>.\Src\Signal.asm</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1275,6 +1295,16 @@
<FileType>1</FileType>
<FilePath>.\Src\principal.c</FilePath>
</File>
<File>
<FileName>DFT.s</FileName>
<FileType>2</FileType>
<FilePath>.\Src\DFT.s</FilePath>
</File>
<File>
<FileName>Signal.asm</FileName>
<FileType>2</FileType>
<FilePath>.\Src\Signal.asm</FilePath>
</File>
</Files>
</Group>
<Group>
@ -1322,7 +1352,7 @@
<LayerInfo>
<Layers>
<Layer>
<LayName>&lt;Project Info&gt;</LayName>
<LayName>StepDFT</LayName>
<LayTarg>0</LayTarg>
<LayPrjMark>1</LayPrjMark>
</Layer>

View file

@ -44,10 +44,12 @@ 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
;mise a l'echelle;