forked from acco/chti23
fin séance
This commit is contained in:
parent
672b04586b
commit
dbe899586d
4 changed files with 146 additions and 24 deletions
|
@ -10,21 +10,57 @@
|
||||||
;Section RAM (read write):
|
;Section RAM (read write):
|
||||||
area maram,data,readwrite
|
area maram,data,readwrite
|
||||||
|
|
||||||
|
SortieSon dcw 0
|
||||||
|
Index dcb 0
|
||||||
|
|
||||||
|
ResolutionEntree equ 32768
|
||||||
|
ResolutionSortie equ 720
|
||||||
|
|
||||||
; ===============================================================================================
|
; ===============================================================================================
|
||||||
|
|
||||||
|
IMPORT Son
|
||||||
|
IMPORT LongueurSon
|
||||||
|
|
||||||
|
EXPORT SortieSon
|
||||||
|
EXPORT CallbackSon
|
||||||
|
EXPORT Index
|
||||||
|
|
||||||
;Section ROM code (read only) :
|
;Section ROM code (read only) :
|
||||||
area moncode,code,readonly
|
area moncode,code,readonly
|
||||||
; écrire le code ici
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CallbackSon proc
|
||||||
|
; int* indexAdress = &Index
|
||||||
|
ldr r5,=Index
|
||||||
|
; int index = *indexAdress
|
||||||
|
ldr r6,[r5]
|
||||||
|
; if (index < LongueurSon) return;
|
||||||
|
ldr r7,=LongueurSon
|
||||||
|
ldr r7,[r7]
|
||||||
|
cmp r6,r7
|
||||||
|
blt LireEchantillon
|
||||||
|
bx lr
|
||||||
|
LireEchantillon
|
||||||
|
; long* son = &Son
|
||||||
|
ldr r7,=Son
|
||||||
|
; long echantillon = son[index]
|
||||||
|
ldr r7,[r6]
|
||||||
|
; index += 1
|
||||||
|
add r6,r6,#1
|
||||||
|
; *indexAdresse = index
|
||||||
|
str r6,[r5]
|
||||||
|
; int resolutionEntree = ResolutionEntree
|
||||||
|
ldr r5,=ResolutionEntree
|
||||||
|
; son = son + ResolutionEntree
|
||||||
|
adds r7,r7,r5
|
||||||
|
; int resolutionSortie = ResolutionSortie
|
||||||
|
ldr r5,=ResolutionSortie
|
||||||
|
; son = son / resolutionSortie
|
||||||
|
sdiv r7,r7,r5
|
||||||
|
; long* sortieSon = &SortieSon
|
||||||
|
ldr r5,=SortieSon
|
||||||
|
; *sortieSon = son
|
||||||
|
str r7,[r5]
|
||||||
|
bx lr
|
||||||
|
endp
|
||||||
|
|
||||||
END
|
END
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
#include "DriverJeuLaser.h"
|
#include "DriverJeuLaser.h"
|
||||||
|
|
||||||
|
#define CLOCK_FREQ 72000 // kHz
|
||||||
|
|
||||||
|
extern int PeriodeSonMicroSec;
|
||||||
|
extern void CallbackSon(void);
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
@ -15,7 +18,11 @@ int main(void)
|
||||||
CLOCK_Configure();
|
CLOCK_Configure();
|
||||||
|
|
||||||
|
|
||||||
|
Timer_1234_Init_ff(TIM4, PeriodeSonMicroSec * CLOCK_FREQ);
|
||||||
|
|
||||||
|
GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
|
||||||
|
|
||||||
|
Active_IT_Debordement_Timer(TIM4, 2, CallbackSon);
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -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</tExt>
|
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||||
<pExt>*.plm</pExt>
|
<pExt>*.plm</pExt>
|
||||||
<CppX>*.cpp</CppX>
|
<CppX>*.cpp</CppX>
|
||||||
<nMigrate>0</nMigrate>
|
<nMigrate>0</nMigrate>
|
||||||
|
@ -75,7 +75,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>
|
||||||
|
@ -154,6 +154,14 @@
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint/>
|
<Breakpoint/>
|
||||||
|
<MemoryWindow1>
|
||||||
|
<Mm>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<SubType>0</SubType>
|
||||||
|
<ItemText>0x08000A38</ItemText>
|
||||||
|
<AccSizeX>0</AccSizeX>
|
||||||
|
</Mm>
|
||||||
|
</MemoryWindow1>
|
||||||
<Tracepoint>
|
<Tracepoint>
|
||||||
<THDelay>0</THDelay>
|
<THDelay>0</THDelay>
|
||||||
</Tracepoint>
|
</Tracepoint>
|
||||||
|
@ -174,7 +182,7 @@
|
||||||
<AscS3>0</AscS3>
|
<AscS3>0</AscS3>
|
||||||
<aSer3>0</aSer3>
|
<aSer3>0</aSer3>
|
||||||
<eProf>0</eProf>
|
<eProf>0</eProf>
|
||||||
<aLa>0</aLa>
|
<aLa>1</aLa>
|
||||||
<aPa1>0</aPa1>
|
<aPa1>0</aPa1>
|
||||||
<AscS4>0</AscS4>
|
<AscS4>0</AscS4>
|
||||||
<aSer4>0</aSer4>
|
<aSer4>0</aSer4>
|
||||||
|
@ -199,8 +207,13 @@
|
||||||
<LogicAnalyzers>
|
<LogicAnalyzers>
|
||||||
<Wi>
|
<Wi>
|
||||||
<IntNumber>0</IntNumber>
|
<IntNumber>0</IntNumber>
|
||||||
<FirstString>((portb & 0x00000002) >> 1 & 0x2) >> 1</FirstString>
|
<FirstString>`SortieSon</FirstString>
|
||||||
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008</SecondString>
|
<SecondString>008000000000000000000000000000000000894000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000001000000000000000000E03F17000000000000000000000000000000000000009C090008</SecondString>
|
||||||
|
</Wi>
|
||||||
|
<Wi>
|
||||||
|
<IntNumber>1</IntNumber>
|
||||||
|
<FirstString>`Index</FirstString>
|
||||||
|
<SecondString>008000000000000000000000000000000070B74000000000000000000000000000000000496E6465780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000002000000000000000000E03F17000000000000000000000000000000000000009C090008</SecondString>
|
||||||
</Wi>
|
</Wi>
|
||||||
</LogicAnalyzers>
|
</LogicAnalyzers>
|
||||||
<DebugDescription>
|
<DebugDescription>
|
||||||
|
@ -460,7 +473,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>
|
||||||
|
@ -538,7 +551,24 @@
|
||||||
<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>27</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\GestionSon.s</Filename>
|
||||||
|
<ExecCommand></ExecCommand>
|
||||||
|
<Expression></Expression>
|
||||||
|
</Bp>
|
||||||
|
</Breakpoint>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
<Mm>
|
<Mm>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
|
@ -624,6 +654,30 @@
|
||||||
<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\bruitverre.asm</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>bruitverre.asm</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\GestionSon.s</PathWithFileName>
|
||||||
|
<FilenameWithoutPath>GestionSon.s</FilenameWithoutPath>
|
||||||
|
<RteFlg>0</RteFlg>
|
||||||
|
<bShared>0</bShared>
|
||||||
|
</File>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -634,7 +688,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>2</FileNumber>
|
<FileNumber>4</FileNumber>
|
||||||
<FileType>2</FileType>
|
<FileType>2</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
@ -654,7 +708,7 @@
|
||||||
<RteFlg>0</RteFlg>
|
<RteFlg>0</RteFlg>
|
||||||
<File>
|
<File>
|
||||||
<GroupNumber>3</GroupNumber>
|
<GroupNumber>3</GroupNumber>
|
||||||
<FileNumber>3</FileNumber>
|
<FileNumber>5</FileNumber>
|
||||||
<FileType>4</FileType>
|
<FileType>4</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>0</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
|
|
|
@ -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>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
@ -388,6 +388,16 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<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>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -797,6 +807,16 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<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>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -897,7 +917,7 @@
|
||||||
<TargetName>CibleSondeST</TargetName>
|
<TargetName>CibleSondeST</TargetName>
|
||||||
<ToolsetNumber>0x4</ToolsetNumber>
|
<ToolsetNumber>0x4</ToolsetNumber>
|
||||||
<ToolsetName>ARM-ADS</ToolsetName>
|
<ToolsetName>ARM-ADS</ToolsetName>
|
||||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||||
<uAC6>0</uAC6>
|
<uAC6>0</uAC6>
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<TargetCommonOption>
|
<TargetCommonOption>
|
||||||
|
@ -1275,6 +1295,16 @@
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>.\Src\principal.c</FilePath>
|
<FilePath>.\Src\principal.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
|
<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>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
<Group>
|
||||||
|
@ -1323,11 +1353,6 @@
|
||||||
<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>
|
||||||
|
|
Loading…
Reference in a new issue