Début son, à finir

This commit is contained in:
Marie Brunetto 2023-04-07 15:16:03 +02:00
parent 9dbcbf0005
commit ac5d9f74b4
7 changed files with 160 additions and 35 deletions

View file

@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -272,7 +272,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -379,7 +379,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>

View file

@ -424,7 +424,7 @@
<TargetName>CibleSondeKEIL</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<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>
<TargetOption>
<TargetCommonOption>

View file

@ -1,7 +1,7 @@
PRESERVE8
THUMB
include DriverJeuLaser.inc
include Driver/DriverJeuLaser.inc
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
@ -23,22 +23,24 @@ FlagCligno dcd 0
; écrire le code ici
timer_callback proc
push lr
push {lr}
mov r0,#1 ; r0 : constant = 1 (arg fonct GPIOB)
ldr r2,=FlagCligno ; r2 : addr de FlagCligno
mov r1,[r2] ; r1 : valeur FlagCligno
ldr r1,[r2] ; r1 : valeur FlagCligno
cmp r1,#0
beq FC0
; if FlagCligno == 1
str #0,[r2]
mov r3,#0
str r3,[r2]
bl GPIOB_Set
b fin
; if FlagCligno == 0
FC0
mov r3,#1
str r3,[r2]
bl GPIOB_Clear
fin
pop pc
pop {pc}
endp
END

View file

@ -1,7 +1,8 @@
PRESERVE8
THUMB
include Driver/DriverJeuLaser.inc
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
area mesdata,data,readonly
@ -10,18 +11,52 @@
;Section RAM (read write):
area maram,data,readwrite
SortieSon dcw 0
Index dcw 0
; ===============================================================================================
EXPORT SortieSon
EXPORT CallbackSon
IMPORT Son
IMPORT LongueurSon
;Section ROM code (read only) :
area moncode,code,readonly
; écrire le code ici
CallbackSon proc
push {lr}
ldr r3,=Index
ldr r1,[r3]
ldr r0,=LongueurSon
ldr r2,[r0]
cmp r1,r2
beq FinSig
bge Fin
; if index < longueur son
ldr r2,=Son ; r2 = @ debut son
ldr r0,[r2,r1]
add r0,#32768
mov r2,#720
mul r0,r2
lsr r0,#16
ldr r2,=SortieSon
str r0,[r2]
add r1,#1
str r1,[r3]
b Fin
;if index = longueurSon
FinSig
mov r0,#0
ldr r2,=SortieSon
str r0,[r2]
add r1,#1
str r1,[r3]
; if index > longueurson
Fin
pop {pc}
endp

View file

@ -2,7 +2,7 @@
#include "DriverJeuLaser.h"
void CallbackSon(void);
int main(void)
{
@ -13,11 +13,12 @@ int main(void)
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
CLOCK_Configure();
Timer_1234_Init_ff( TIM4, 6552 );
Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
//============================================================================

View file

@ -10,7 +10,7 @@
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -154,13 +154,28 @@
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>SortieSon</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>257</SubType>
<ItemText>r0</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
@ -199,8 +214,8 @@
<LogicAnalyzers>
<Wi>
<IntNumber>0</IntNumber>
<FirstString>((portb &amp; 0x00000002) &gt;&gt; 1 &amp; 0x2) &gt;&gt; 1</FirstString>
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008</SecondString>
<FirstString>`SortieSon</FirstString>
<SecondString>0080000000000000000000000000E0FFFFFFEF4100000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F0A00000000000000000000000000000000000000080A0008</SecondString>
</Wi>
</LogicAnalyzers>
<DebugDescription>
@ -360,7 +375,7 @@
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
@ -460,7 +475,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -608,7 +623,7 @@
<Group>
<GroupName>Sources</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -666,6 +681,38 @@
</File>
</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>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<tvExp>0</tvExp>

View file

@ -10,7 +10,7 @@
<TargetName>Simu</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<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>
<TargetOption>
<TargetCommonOption>
@ -410,6 +410,21 @@
</File>
</Files>
</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>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
@ -419,7 +434,7 @@
<TargetName>CibleSondeKEIL</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<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>
<TargetOption>
<TargetCommonOption>
@ -819,6 +834,21 @@
</File>
</Files>
</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>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<GroupOption>
@ -897,7 +927,7 @@
<TargetName>CibleSondeST</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<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>
<TargetOption>
<TargetCommonOption>
@ -1297,6 +1327,21 @@
</File>
</Files>
</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>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
@ -1322,12 +1367,7 @@
<LayerInfo>
<Layers>
<Layer>
<LayName>&lt;Project Info&gt;</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayName>StepSon</LayName>
<LayTarg>0</LayTarg>
<LayPrjMark>1</LayPrjMark>
</Layer>