fin séance 18/04
This commit is contained in:
parent
5eb4a91b33
commit
af0a9df926
37 changed files with 15583 additions and 15529 deletions
|
|
@ -21,12 +21,16 @@ index dcd 0
|
||||||
EXTERN Son ;
|
EXTERN Son ;
|
||||||
EXTERN LongueurSon ;
|
EXTERN LongueurSon ;
|
||||||
EXPORT SortieSon ; //pour evaluer la variable lors des tests
|
EXPORT SortieSon ; //pour evaluer la variable lors des tests
|
||||||
|
EXPORT StartSon ;
|
||||||
|
include ../Driver/DriverJeuLaser.inc;
|
||||||
|
EXPORT index ; //pour evaluer la variable lors des tests
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;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
|
||||||
CallbackSon
|
CallbackSon proc
|
||||||
ldr r1, =index
|
ldr r1, =index
|
||||||
ldr r2, [r1]
|
ldr r2, [r1]
|
||||||
ldr r3, =Son
|
ldr r3, =Son
|
||||||
|
|
@ -34,6 +38,13 @@ CallbackSon
|
||||||
|
|
||||||
cmp r2, r0
|
cmp r2, r0
|
||||||
ble notEqual
|
ble notEqual
|
||||||
|
push {R8}
|
||||||
|
push {R5}
|
||||||
|
ldr R8, =SortieSon
|
||||||
|
mov R5,#-1
|
||||||
|
strh R5,[R8]
|
||||||
|
pop {R5}
|
||||||
|
pop{R8}
|
||||||
|
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
|
|
@ -50,9 +61,15 @@ notEqual
|
||||||
pop {r4}
|
pop {r4}
|
||||||
push {r7}
|
push {r7}
|
||||||
ldr r7, =SortieSon
|
ldr r7, =SortieSon
|
||||||
str r0, [r7]
|
strh r0, [r7]
|
||||||
pop {r7}
|
pop {r7}
|
||||||
|
|
||||||
|
push{r2}
|
||||||
|
push {lr}
|
||||||
|
bl PWM_Set_Value_TIM3_Ch3
|
||||||
|
pop {lr}
|
||||||
|
pop{r2}
|
||||||
|
|
||||||
add r2, #1
|
add r2, #1
|
||||||
push {r5}
|
push {r5}
|
||||||
ldr r5, =index
|
ldr r5, =index
|
||||||
|
|
@ -62,4 +79,13 @@ notEqual
|
||||||
|
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
|
endp
|
||||||
|
|
||||||
|
|
||||||
|
StartSon proc
|
||||||
|
ldr R1, =index
|
||||||
|
mov R2,#0
|
||||||
|
str R2, [R1]
|
||||||
|
bx lr
|
||||||
|
endp
|
||||||
END
|
END
|
||||||
|
|
@ -2,8 +2,11 @@
|
||||||
|
|
||||||
#include "DriverJeuLaser.h"
|
#include "DriverJeuLaser.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CallbackSon(void);
|
void CallbackSon(void);
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -17,7 +20,11 @@ CLOCK_Configure();
|
||||||
//** Notre code là ** //
|
//** Notre code là ** //
|
||||||
Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
|
Active_IT_Debordement_Timer( TIM4, 2, CallbackSon );
|
||||||
Timer_1234_Init_ff( TIM4, 6552);
|
Timer_1234_Init_ff( TIM4, 6552);
|
||||||
|
PWM_Init_ff(TIM3, 3, 720 ); //fréquence de la PWM 10e5 Hz
|
||||||
|
GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL); //plus le PWM est en haut longtemps plus la alpha (valeur sur 1 bit)
|
||||||
|
|
||||||
|
extern void StartSon();
|
||||||
|
extern short SortieSon;
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
@ -25,6 +32,10 @@ Timer_1234_Init_ff( TIM4, 6552);
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
if(SortieSon==-1)
|
||||||
|
{
|
||||||
|
StartSon();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,40 +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>30</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>134219960</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
|
||||||
<Filename>.\Src\GestionSon.s</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression>\\StepSon\Src/GestionSon.s\30</Expression>
|
|
||||||
</Bp>
|
|
||||||
<Bp>
|
|
||||||
<Number>1</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>64</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>
|
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>0</count>
|
<count>0</count>
|
||||||
|
|
@ -208,7 +175,35 @@
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>r0,0x0A</ItemText>
|
<ItemText>r0,0x0A</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>4</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>portb</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>5</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>index,0x0A</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>6</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>r7</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>7</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>R5</ItemText>
|
||||||
|
</Ww>
|
||||||
</WatchWindow1>
|
</WatchWindow1>
|
||||||
|
<MemoryWindow1>
|
||||||
|
<Mm>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<SubType>257</SubType>
|
||||||
|
<ItemText>r0</ItemText>
|
||||||
|
<AccSizeX>0</AccSizeX>
|
||||||
|
</Mm>
|
||||||
|
</MemoryWindow1>
|
||||||
<Tracepoint>
|
<Tracepoint>
|
||||||
<THDelay>0</THDelay>
|
<THDelay>0</THDelay>
|
||||||
</Tracepoint>
|
</Tracepoint>
|
||||||
|
|
@ -229,7 +224,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>
|
||||||
|
|
@ -254,8 +249,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>0080000000000000000000000000000000408F4000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000001000000000000000000E03F180000000000000000000000000000000000000094080008</SecondString>
|
||||||
|
</Wi>
|
||||||
|
<Wi>
|
||||||
|
<IntNumber>1</IntNumber>
|
||||||
|
<FirstString>`portb</FirstString>
|
||||||
|
<SecondString>00008000000000000000000000000000E0FFEF4001000000000000000000000000000000706F7274620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000002000000000000000000E03F1800000000000000000000000000000000000000E60A0008</SecondString>
|
||||||
</Wi>
|
</Wi>
|
||||||
</LogicAnalyzers>
|
</LogicAnalyzers>
|
||||||
<DebugDescription>
|
<DebugDescription>
|
||||||
|
|
@ -401,6 +401,23 @@
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint/>
|
<Breakpoint/>
|
||||||
|
<WatchWindow1>
|
||||||
|
<Ww>
|
||||||
|
<count>0</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>SortieSon,0x0A</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>1</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>index,0x0A</ItemText>
|
||||||
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>2</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>R1,0x0A</ItemText>
|
||||||
|
</Ww>
|
||||||
|
</WatchWindow1>
|
||||||
<MemoryWindow1>
|
<MemoryWindow1>
|
||||||
<Mm>
|
<Mm>
|
||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
|
|
@ -429,7 +446,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>
|
||||||
|
|
|
||||||
|
|
@ -434,7 +434,7 @@
|
||||||
<TargetName>CibleSondeKEIL</TargetName>
|
<TargetName>CibleSondeKEIL</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>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue