派生自 acco/chti23
比较提交
1 提交
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
7f62cad9a7 |
共有 15 个文件被更改,包括 69 次插入 和 464 次删除
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -108,3 +108,4 @@ RTE
|
||||||
|
|
||||||
# To explicitly override the above, define any exceptions here; e.g.:
|
# To explicitly override the above, define any exceptions here; e.g.:
|
||||||
# !my_customized_scatter_file.sct
|
# !my_customized_scatter_file.sct
|
||||||
|
*.slprj
|
||||||
|
|
@ -1,31 +1,40 @@
|
||||||
clear all;
|
clear all;
|
||||||
close all;
|
close all;
|
||||||
|
%% Paramêtres utilisatrice
|
||||||
|
%
|
||||||
|
|
||||||
%% Paramètres
|
T = 0.25; % Fenêtre d'observation [s]
|
||||||
T = 0.25; % Fenêtre d'observation
|
M=32; % Nombre d'échantillons dans la fenêtre
|
||||||
M=32; % Nombre d'échantillons dans la fenêtre
|
Fsin = 4 ; % Fréquence d'un sinus [Hz]
|
||||||
|
%% Paramêtres déduits
|
||||||
|
|
||||||
%% Paramètres déduits
|
|
||||||
Te = T/M; % Période d'échantillonnage
|
|
||||||
Tsim = T-Te; % Instant final de simulation
|
|
||||||
Fsin = 4 ;
|
|
||||||
%% Calculs préliminaires
|
|
||||||
|
|
||||||
|
|
||||||
|
Te = T/M; % Période d'échantillonnage [s]
|
||||||
|
Tsim = T-Te; % Instant final de simulation avec M points [s]
|
||||||
|
fprintf("Fréquence = %f Hz", 1/Te)
|
||||||
|
%% Calculs préliminaires
|
||||||
%% Lancement de simulink
|
%% Lancement de simulink
|
||||||
out=sim("simDFT")
|
|
||||||
|
|
||||||
|
tic
|
||||||
|
out=sim("simDFT");
|
||||||
|
toc
|
||||||
%% Visualisations temporelle
|
%% Visualisations temporelle
|
||||||
|
|
||||||
plot(out.sin_continu,'.-');
|
plot(out.sin_continu,'.-');
|
||||||
hold on;
|
hold on;
|
||||||
plot(out.sin_echanti,'o');
|
|
||||||
grid on;
|
|
||||||
|
|
||||||
|
t = out.sin_echanti.Time;
|
||||||
|
sig = out.sin_echanti.Data;
|
||||||
|
|
||||||
|
stem(t, sig , 'o');
|
||||||
|
grid on;
|
||||||
%% Calcul DFT
|
%% Calcul DFT
|
||||||
|
|
||||||
|
Tfd = fft(sig);
|
||||||
|
abscisses=1:length(Tfd);
|
||||||
|
|
||||||
%% visualisation DFT
|
%% visualisation DFT
|
||||||
figure();
|
|
||||||
|
|
||||||
|
|
||||||
|
figure()
|
||||||
|
plot(abscisses,abs(Tfd),'o-');
|
||||||
|
ylabel("Module Transformée de Fourier")
|
||||||
|
xlabel("??? indices de tableau Matlab de 1 à 32 ???")
|
||||||
二进制
signal/matlab/scriptDFT.mlx
普通文件
二进制
signal/matlab/scriptDFT.mlx
普通文件
二进制文件未显示。
二进制文件未显示。
|
|
@ -13,90 +13,16 @@
|
||||||
|
|
||||||
|
|
||||||
; ===============================================================================================
|
; ===============================================================================================
|
||||||
EXTERN LeSignal;
|
|
||||||
EXPORT DFT_ModuleAuCarre;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;Section ROM code (read only) :
|
;Section ROM code (read only) :
|
||||||
area moncode,code,readonly
|
area moncode,code,readonly
|
||||||
; écrire le code ici
|
; écrire le code ici
|
||||||
DFT_ModuleAuCarre proc
|
|
||||||
|
|
||||||
LDR r2,=LeSignal
|
|
||||||
mov r3,#0 ; compteur
|
|
||||||
push {r4}
|
|
||||||
push {r5}
|
|
||||||
push {r6}
|
|
||||||
push {r7}
|
|
||||||
push {r8}
|
|
||||||
push {r9}
|
|
||||||
push {r10}
|
|
||||||
push {r11}
|
|
||||||
push {r12}
|
|
||||||
|
|
||||||
LDR r4,=TabCos
|
|
||||||
LDR r5,=TabSin
|
|
||||||
MOV r8,#0 ; Xreel
|
|
||||||
MOV r9,#64 ; max
|
|
||||||
MOV r0,#0
|
|
||||||
|
|
||||||
Loop
|
|
||||||
;calcul de p=k*n[M] dans r11
|
|
||||||
push {r0}
|
|
||||||
push {r4}
|
|
||||||
mul r0,r1,r3
|
|
||||||
and r0,r0,#63
|
|
||||||
mov r4,#2
|
|
||||||
MUL r11,r0,r4
|
|
||||||
pop{r4}
|
|
||||||
pop {r0}
|
|
||||||
|
|
||||||
LDRSH r6,[r4,r11] ; load le cos (1.15)
|
|
||||||
LDRSH r10,[r5,r11] ; load le sin (1.15)
|
|
||||||
|
|
||||||
push{r0}
|
|
||||||
push{r1}
|
|
||||||
mov r0,#2
|
|
||||||
mul r1,r3,r0
|
|
||||||
LDRSH r7,[r2,r1] ; load le signal (format 4.12)
|
|
||||||
pop{r1}
|
|
||||||
pop{r0}
|
|
||||||
|
|
||||||
MUL r6,r7,r6 ; mul cos et val res en (5.27)
|
|
||||||
MUL r10,r7,r10 ; mul sin et val res resultat en (5.27)
|
|
||||||
|
|
||||||
ADD r8,r6 ; sum partie reel
|
|
||||||
ADD r0,r10 ; sum partie imaginaire
|
|
||||||
ADD r3,#1
|
|
||||||
CMP r3,r9
|
|
||||||
pop{r5}
|
|
||||||
pop{r5}
|
|
||||||
BNE Loop
|
|
||||||
|
|
||||||
push {r1}
|
|
||||||
push {r11}
|
|
||||||
UMLAL r11,r12,r8,r8 ; format (10.54) avec 2 registre de 32bits chacun (R11(low) et R12(high))
|
|
||||||
UMLAL r1,r7,r0,r0 ; format (10.54) avec 2 registre de 32bits chacun (R1(low) et R7(high))
|
|
||||||
pop {r11}
|
|
||||||
pop{r1}
|
|
||||||
|
|
||||||
mov r0,#0
|
|
||||||
ADD r0,r12,r7 ; r0 au format (10.22)
|
|
||||||
|
|
||||||
pop {r12}
|
|
||||||
pop {r11}
|
|
||||||
pop {r10}
|
|
||||||
pop {r9}
|
|
||||||
pop {r8}
|
|
||||||
pop {r7}
|
|
||||||
pop {r6}
|
|
||||||
pop {r5}
|
|
||||||
pop {r4}
|
|
||||||
|
|
||||||
bx lr
|
|
||||||
ENDFUNC
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;Section ROM code (read only) :
|
;Section ROM code (read only) :
|
||||||
|
|
@ -235,9 +161,6 @@ TabSin
|
||||||
DCW -3212 ; 63 0xf374 -0.09802
|
DCW -3212 ; 63 0xf374 -0.09802
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#include "DriverJeuLaser.h"
|
#include "DriverJeuLaser.h"
|
||||||
|
|
||||||
|
|
||||||
extern int DFT_ModuleAuCarre(short int* Signal64ech, char k);
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
@ -19,12 +20,9 @@ CLOCK_Configure();
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
short int * x;
|
|
||||||
int res = DFT_ModuleAuCarre(x,1);
|
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>1</IsCurrentTarget>
|
<IsCurrentTarget>0</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
|
@ -153,56 +153,7 @@
|
||||||
<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>
|
<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>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint>
|
<Breakpoint/>
|
||||||
<Bp>
|
|
||||||
<Number>0</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>49</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>134218438</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\49</Expression>
|
|
||||||
</Bp>
|
|
||||||
</Breakpoint>
|
|
||||||
<WatchWindow1>
|
|
||||||
<Ww>
|
|
||||||
<count>0</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r8</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>1</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r0</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>2</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r10</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>3</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r6</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>4</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r7</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>5</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r11</ItemText>
|
|
||||||
</Ww>
|
|
||||||
</WatchWindow1>
|
|
||||||
<Tracepoint>
|
<Tracepoint>
|
||||||
<THDelay>0</THDelay>
|
<THDelay>0</THDelay>
|
||||||
</Tracepoint>
|
</Tracepoint>
|
||||||
|
|
@ -316,7 +267,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>0</IsCurrentTarget>
|
<IsCurrentTarget>1</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
|
@ -673,30 +624,6 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<bShared>0</bShared>
|
<bShared>0</bShared>
|
||||||
</File>
|
</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>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
|
|
@ -707,7 +634,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>4</FileNumber>
|
<FileNumber>2</FileNumber>
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
@ -727,7 +654,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>3</GroupNumber>
|
<GroupNumber>3</GroupNumber>
|
||||||
<FileNumber>5</FileNumber>
|
<FileNumber>3</FileNumber>
|
||||||
<FileType>4</FileType>
|
<FileType>4</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
|
||||||
|
|
@ -388,16 +388,6 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</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>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
|
@ -807,16 +797,6 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</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>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
|
@ -1295,16 +1275,6 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</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>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
|
@ -1352,7 +1322,7 @@
|
||||||
<LayerInfo>
|
<LayerInfo>
|
||||||
<Layers>
|
<Layers>
|
||||||
<Layer>
|
<Layer>
|
||||||
<LayName>StepDFT</LayName>
|
<LayName><Project Info></LayName>
|
||||||
<LayTarg>0</LayTarg>
|
<LayTarg>0</LayTarg>
|
||||||
<LayPrjMark>1</LayPrjMark>
|
<LayPrjMark>1</LayPrjMark>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<aExt>*.s*; *.src; *.a*</aExt>
|
<aExt>*.s*; *.src; *.a*</aExt>
|
||||||
<oExt>*.obj; *.o</oExt>
|
<oExt>*.obj; *.o</oExt>
|
||||||
<lExt>*.lib</lExt>
|
<lExt>*.lib</lExt>
|
||||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
<tExt>*.txt; *.h; *.inc</tExt>
|
||||||
<pExt>*.plm</pExt>
|
<pExt>*.plm</pExt>
|
||||||
<CppX>*.cpp</CppX>
|
<CppX>*.cpp</CppX>
|
||||||
<nMigrate>0</nMigrate>
|
<nMigrate>0</nMigrate>
|
||||||
|
|
|
||||||
|
|
@ -1338,6 +1338,11 @@
|
||||||
<Layers>
|
<Layers>
|
||||||
<Layer>
|
<Layer>
|
||||||
<LayName><Project Info></LayName>
|
<LayName><Project Info></LayName>
|
||||||
|
<LayDesc></LayDesc>
|
||||||
|
<LayUrl></LayUrl>
|
||||||
|
<LayKeys></LayKeys>
|
||||||
|
<LayCat></LayCat>
|
||||||
|
<LayLic></LayLic>
|
||||||
<LayTarg>0</LayTarg>
|
<LayTarg>0</LayTarg>
|
||||||
<LayPrjMark>1</LayPrjMark>
|
<LayPrjMark>1</LayPrjMark>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
extern short SortieSon;
|
|
||||||
extern void StartSon();
|
|
||||||
|
|
@ -11,18 +11,9 @@
|
||||||
area maram,data,readwrite
|
area maram,data,readwrite
|
||||||
|
|
||||||
|
|
||||||
SortieSon dcw 0
|
|
||||||
indexTab dcd 0
|
|
||||||
|
|
||||||
|
|
||||||
; ===============================================================================================
|
; ===============================================================================================
|
||||||
EXPORT CallbackSon;
|
|
||||||
EXPORT StartSon;
|
|
||||||
EXPORT SortieSon;
|
|
||||||
EXTERN LongueurSon;
|
|
||||||
EXTERN Son;
|
|
||||||
EXTERN PWM_Set_Value_TIM3_Ch3;
|
|
||||||
INCLUDE ../Driver/DriverJeuLaser.inc;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -30,65 +21,10 @@ indexTab dcd 0
|
||||||
area moncode,code,readonly
|
area moncode,code,readonly
|
||||||
; écrire le code ici
|
; écrire le code ici
|
||||||
|
|
||||||
StartSon proc
|
|
||||||
|
|
||||||
LDR r0,=indexTab
|
|
||||||
MOV r1,#0
|
|
||||||
STR r1,[r0]
|
|
||||||
BX LR
|
|
||||||
endp
|
|
||||||
|
|
||||||
CallbackSon proc
|
|
||||||
LDR r0,=SortieSon
|
|
||||||
LDR r1,=Son
|
|
||||||
LDR r3,=indexTab
|
|
||||||
push {r4}
|
|
||||||
push {r5}
|
|
||||||
push {r6}
|
|
||||||
push {r7}
|
|
||||||
push {r8}
|
|
||||||
LDR r7,=LongueurSon
|
|
||||||
LDR r8,[r7]
|
|
||||||
|
|
||||||
LDR r6,[r3] ; dans r6 la valeur de indextab
|
|
||||||
CMP r8,r6
|
|
||||||
BEQ Fin
|
|
||||||
|
|
||||||
MOV r2, #2
|
|
||||||
MUL r2,r6,r2
|
|
||||||
LDRSH r4,[r1,r2] ; 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]
|
|
||||||
MOV r0,r5
|
|
||||||
push {lr}
|
|
||||||
BL PWM_Set_Value_TIM3_Ch3
|
|
||||||
pop{lr}
|
|
||||||
add r6,r6,#1
|
|
||||||
STR r6,[r3]
|
|
||||||
|
|
||||||
pop {r8}
|
|
||||||
pop {r7}
|
|
||||||
pop {r6}
|
|
||||||
pop {r5}
|
|
||||||
pop {r4}
|
|
||||||
BX lr
|
|
||||||
|
|
||||||
Fin
|
|
||||||
MOV r2,#-1
|
|
||||||
STR r2,[r0]
|
|
||||||
|
|
||||||
pop {r8}
|
|
||||||
pop {r7}
|
|
||||||
pop {r6}
|
|
||||||
pop {r5}
|
|
||||||
pop {r4}
|
|
||||||
BX lr
|
|
||||||
endp
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
@ -1,34 +1,28 @@
|
||||||
|
|
||||||
|
|
||||||
#include "DriverJeuLaser.h"
|
#include "DriverJeuLaser.h"
|
||||||
#include "GestionSon.h"
|
|
||||||
|
|
||||||
|
|
||||||
void CallbackSon(void);
|
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
// ============= INIT PERIPH (faites qu'une seule fois) =====================
|
// ============= INIT PERIPH (faites qu'une seule fois) =====================
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
|
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
|
||||||
CLOCK_Configure();
|
CLOCK_Configure();
|
||||||
|
|
||||||
|
|
||||||
Timer_1234_Init_ff( TIM4, 91.0f*10e-6/(1.0f/72.0f*10e-6));
|
|
||||||
PWM_Init_ff( TIM3, 3, 720); //655 ms
|
|
||||||
Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
|
|
||||||
GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if(SortieSon==-1)
|
|
||||||
{
|
|
||||||
StartSon();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<aExt>*.s*; *.src; *.a*</aExt>
|
<aExt>*.s*; *.src; *.a*</aExt>
|
||||||
<oExt>*.obj; *.o</oExt>
|
<oExt>*.obj; *.o</oExt>
|
||||||
<lExt>*.lib</lExt>
|
<lExt>*.lib</lExt>
|
||||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
<tExt>*.txt; *.h; *.inc</tExt>
|
||||||
<pExt>*.plm</pExt>
|
<pExt>*.plm</pExt>
|
||||||
<CppX>*.cpp</CppX>
|
<CppX>*.cpp</CppX>
|
||||||
<nMigrate>0</nMigrate>
|
<nMigrate>0</nMigrate>
|
||||||
|
|
@ -154,51 +154,6 @@
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint/>
|
<Breakpoint/>
|
||||||
<WatchWindow1>
|
|
||||||
<Ww>
|
|
||||||
<count>0</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r5,0x0A</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>1</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r4,0x0A</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>2</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r6</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>3</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r0,0x0A</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>4</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>SortieSon</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>5</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r8,0x0A</ItemText>
|
|
||||||
</Ww>
|
|
||||||
<Ww>
|
|
||||||
<count>6</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>r6,0x0A</ItemText>
|
|
||||||
</Ww>
|
|
||||||
</WatchWindow1>
|
|
||||||
<MemoryWindow1>
|
|
||||||
<Mm>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<SubType>0</SubType>
|
|
||||||
<ItemText>0x00000F0C</ItemText>
|
|
||||||
<AccSizeX>0</AccSizeX>
|
|
||||||
</Mm>
|
|
||||||
</MemoryWindow1>
|
|
||||||
<Tracepoint>
|
<Tracepoint>
|
||||||
<THDelay>0</THDelay>
|
<THDelay>0</THDelay>
|
||||||
</Tracepoint>
|
</Tracepoint>
|
||||||
|
|
@ -219,7 +174,7 @@
|
||||||
<AscS3>0</AscS3>
|
<AscS3>0</AscS3>
|
||||||
<aSer3>0</aSer3>
|
<aSer3>0</aSer3>
|
||||||
<eProf>0</eProf>
|
<eProf>0</eProf>
|
||||||
<aLa>1</aLa>
|
<aLa>0</aLa>
|
||||||
<aPa1>0</aPa1>
|
<aPa1>0</aPa1>
|
||||||
<AscS4>0</AscS4>
|
<AscS4>0</AscS4>
|
||||||
<aSer4>0</aSer4>
|
<aSer4>0</aSer4>
|
||||||
|
|
@ -244,13 +199,8 @@
|
||||||
<LogicAnalyzers>
|
<LogicAnalyzers>
|
||||||
<Wi>
|
<Wi>
|
||||||
<IntNumber>0</IntNumber>
|
<IntNumber>0</IntNumber>
|
||||||
<FirstString>`SortieSon</FirstString>
|
<FirstString>((portb & 0x00000002) >> 1 & 0x2) >> 1</FirstString>
|
||||||
<SecondString>0080000000000000000000000000000000408F4000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000001000000000000000000E03F1700000000000000000000000000000000000000540A0008</SecondString>
|
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008</SecondString>
|
||||||
</Wi>
|
|
||||||
<Wi>
|
|
||||||
<IntNumber>1</IntNumber>
|
|
||||||
<FirstString>((portb & 0x00000001) & 0x1) >> 0</FirstString>
|
|
||||||
<SecondString>0080000000000000000000000000000000408F400000000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000002000000000000000000E03F1700000000000000000000000000000000000000B40A0008</SecondString>
|
|
||||||
</Wi>
|
</Wi>
|
||||||
</LogicAnalyzers>
|
</LogicAnalyzers>
|
||||||
<DebugDescription>
|
<DebugDescription>
|
||||||
|
|
@ -317,7 +267,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>1</IsCurrentTarget>
|
<IsCurrentTarget>0</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
|
@ -396,13 +346,6 @@
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint/>
|
<Breakpoint/>
|
||||||
<WatchWindow1>
|
|
||||||
<Ww>
|
|
||||||
<count>0</count>
|
|
||||||
<WinNumber>1</WinNumber>
|
|
||||||
<ItemText>SortieSon</ItemText>
|
|
||||||
</Ww>
|
|
||||||
</WatchWindow1>
|
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
<Mm>
|
<Mm>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
|
|
@ -431,7 +374,7 @@
|
||||||
<AscS3>0</AscS3>
|
<AscS3>0</AscS3>
|
||||||
<aSer3>0</aSer3>
|
<aSer3>0</aSer3>
|
||||||
<eProf>0</eProf>
|
<eProf>0</eProf>
|
||||||
<aLa>1</aLa>
|
<aLa>0</aLa>
|
||||||
<aPa1>0</aPa1>
|
<aPa1>0</aPa1>
|
||||||
<AscS4>0</AscS4>
|
<AscS4>0</AscS4>
|
||||||
<aSer4>0</aSer4>
|
<aSer4>0</aSer4>
|
||||||
|
|
@ -517,7 +460,7 @@
|
||||||
<OPTFL>
|
<OPTFL>
|
||||||
<tvExp>1</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>0</IsCurrentTarget>
|
<IsCurrentTarget>1</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>18</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<DebugOpt>
|
<DebugOpt>
|
||||||
|
|
@ -723,50 +666,6 @@
|
||||||
</File>
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
|
||||||
<GroupName>Son</GroupName>
|
|
||||||
<tvExp>1</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<cbSel>0</cbSel>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>4</GroupNumber>
|
|
||||||
<FileNumber>4</FileNumber>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>.\Src\bruitverre.asm</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>bruitverre.asm</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>4</GroupNumber>
|
|
||||||
<FileNumber>5</FileNumber>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>.\Src\GestionSon.s</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>GestionSon.s</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<GroupNumber>4</GroupNumber>
|
|
||||||
<FileNumber>6</FileNumber>
|
|
||||||
<FileType>5</FileType>
|
|
||||||
<tvExp>0</tvExp>
|
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
|
||||||
<bDave2>0</bDave2>
|
|
||||||
<PathWithFileName>.\Src\GestionSon.h</PathWithFileName>
|
|
||||||
<FilenameWithoutPath>GestionSon.h</FilenameWithoutPath>
|
|
||||||
<RteFlg>0</RteFlg>
|
|
||||||
<bShared>0</bShared>
|
|
||||||
</File>
|
|
||||||
</Group>
|
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>::CMSIS</GroupName>
|
<GroupName>::CMSIS</GroupName>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<TargetName>Simu</TargetName>
|
<TargetName>Simu</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
|
@ -410,26 +410,6 @@
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
|
||||||
<GroupName>Son</GroupName>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>bruitverre.asm</FileName>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<FilePath>.\Src\bruitverre.asm</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>GestionSon.s</FileName>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>GestionSon.h</FileName>
|
|
||||||
<FileType>5</FileType>
|
|
||||||
<FilePath>.\Src\GestionSon.h</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
</Group>
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>::CMSIS</GroupName>
|
<GroupName>::CMSIS</GroupName>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
@ -439,7 +419,7 @@
|
||||||
<TargetName>CibleSondeKEIL</TargetName>
|
<TargetName>CibleSondeKEIL</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
|
@ -839,26 +819,6 @@
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
|
||||||
<GroupName>Son</GroupName>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>bruitverre.asm</FileName>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<FilePath>.\Src\bruitverre.asm</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>GestionSon.s</FileName>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>GestionSon.h</FileName>
|
|
||||||
<FileType>5</FileType>
|
|
||||||
<FilePath>.\Src\GestionSon.h</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
</Group>
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>::CMSIS</GroupName>
|
<GroupName>::CMSIS</GroupName>
|
||||||
<GroupOption>
|
<GroupOption>
|
||||||
|
|
@ -937,7 +897,7 @@
|
||||||
<TargetName>CibleSondeST</TargetName>
|
<TargetName>CibleSondeST</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
|
@ -1337,26 +1297,6 @@
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
|
||||||
<GroupName>Son</GroupName>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>bruitverre.asm</FileName>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<FilePath>.\Src\bruitverre.asm</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>GestionSon.s</FileName>
|
|
||||||
<FileType>2</FileType>
|
|
||||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
|
||||||
</File>
|
|
||||||
<File>
|
|
||||||
<FileName>GestionSon.h</FileName>
|
|
||||||
<FileType>5</FileType>
|
|
||||||
<FilePath>.\Src\GestionSon.h</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
</Group>
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>::CMSIS</GroupName>
|
<GroupName>::CMSIS</GroupName>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
@ -1382,7 +1322,12 @@
|
||||||
<LayerInfo>
|
<LayerInfo>
|
||||||
<Layers>
|
<Layers>
|
||||||
<Layer>
|
<Layer>
|
||||||
<LayName>StepSon</LayName>
|
<LayName><Project Info></LayName>
|
||||||
|
<LayDesc></LayDesc>
|
||||||
|
<LayUrl></LayUrl>
|
||||||
|
<LayKeys></LayKeys>
|
||||||
|
<LayCat></LayCat>
|
||||||
|
<LayLic></LayLic>
|
||||||
<LayTarg>0</LayTarg>
|
<LayTarg>0</LayTarg>
|
||||||
<LayPrjMark>1</LayPrjMark>
|
<LayPrjMark>1</LayPrjMark>
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用