forked from acco/chti23
finDuTp3
This commit is contained in:
parent
15cdcee56f
commit
66b712c46a
4 changed files with 85 additions and 21 deletions
|
@ -1,6 +1,6 @@
|
|||
PRESERVE8
|
||||
THUMB
|
||||
|
||||
include ../Driver/DriverJeuLaser.inc
|
||||
|
||||
; ====================== zone de réservation de données, ======================================
|
||||
;Section RAM (read only) :
|
||||
|
@ -10,7 +10,15 @@
|
|||
;Section RAM (read write):
|
||||
area maram,data,readwrite
|
||||
|
||||
index dcd 5512
|
||||
SortieSon dcw 0
|
||||
|
||||
export index
|
||||
export SortieSon
|
||||
export Callbackson
|
||||
|
||||
extern Son
|
||||
extern LongueurSon
|
||||
|
||||
; ===============================================================================================
|
||||
|
||||
|
@ -21,10 +29,40 @@
|
|||
area moncode,code,readonly
|
||||
; écrire le code ici
|
||||
|
||||
;r0 Son
|
||||
;r1 Index
|
||||
;r2 Adresse index
|
||||
;r3 Pour les calculs
|
||||
|
||||
Callbackson
|
||||
|
||||
ldr r2, =index
|
||||
ldr r1, [r2]
|
||||
|
||||
ldr r0, =Son
|
||||
|
||||
ldr r3, =LongueurSon
|
||||
|
||||
cmp r1, r3
|
||||
bne Conversion
|
||||
|
||||
mov r0, #0
|
||||
|
||||
|
||||
Conversion
|
||||
|
||||
add r0, #32768
|
||||
mov r3, #719
|
||||
mul r0, r3
|
||||
mov r3, #65535
|
||||
udiv r0, r3
|
||||
|
||||
|
||||
add r1, #1
|
||||
str r1, [r2]
|
||||
|
||||
ldr r3, =SortieSon
|
||||
str r3,[r0]
|
||||
|
||||
|
||||
END
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "DriverJeuLaser.h"
|
||||
|
||||
|
||||
void Callbackson(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
@ -14,8 +14,11 @@ 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);
|
||||
|
||||
GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
|
||||
|
||||
Active_IT_Debordement_Timer(TIM4, 2, Callbackson);
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
@ -23,6 +26,7 @@ CLOCK_Configure();
|
|||
|
||||
while (1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
@ -460,7 +460,7 @@
|
|||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
|
@ -616,7 +616,7 @@
|
|||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>1</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\Src\principal.c</PathWithFileName>
|
||||
|
@ -624,6 +624,18 @@
|
|||
<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\GestionSon.s</PathWithFileName>
|
||||
<FilenameWithoutPath>GestionSon.s</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
|
@ -634,7 +646,7 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>2</FileNumber>
|
||||
<FileNumber>3</FileNumber>
|
||||
<FileType>2</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
@ -654,7 +666,7 @@
|
|||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>3</FileNumber>
|
||||
<FileNumber>4</FileNumber>
|
||||
<FileType>4</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
|
|
|
@ -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>
|
||||
|
@ -388,6 +388,11 @@
|
|||
<FileType>1</FileType>
|
||||
<FilePath>.\Src\principal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>GestionSon.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
@ -797,6 +802,11 @@
|
|||
<FileType>1</FileType>
|
||||
<FilePath>.\Src\principal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>GestionSon.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
@ -1275,6 +1285,11 @@
|
|||
<FileType>1</FileType>
|
||||
<FilePath>.\Src\principal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>GestionSon.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\Src\GestionSon.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
@ -1322,12 +1337,7 @@
|
|||
<LayerInfo>
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayName>StepSon</LayName>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
|
Loading…
Reference in a new issue