forked from acco/chti23
test
This commit is contained in:
parent
15cdcee56f
commit
ec01dc9501
7 changed files with 182 additions and 50 deletions
|
@ -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>1</IsCurrentTarget>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
|
@ -153,7 +153,55 @@
|
|||
<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>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>56</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134218716</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\Src\Delay.s</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\BacASable\Src/Delay.s\56</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>1</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>58</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134218718</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\Src\Delay.s</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\BacASable\Src/Delay.s\58</Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>VarTime</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<MemoryWindow1>
|
||||
<Mm>
|
||||
<WinNumber>1</WinNumber>
|
||||
<SubType>260</SubType>
|
||||
<ItemText>0x20000000</ItemText>
|
||||
<AccSizeX>0</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow1>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
|
@ -196,6 +244,13 @@
|
|||
<pszMrulep></pszMrulep>
|
||||
<pSingCmdsp></pSingCmdsp>
|
||||
<pMultCmdsp></pMultCmdsp>
|
||||
<LogicAnalyzers>
|
||||
<Wi>
|
||||
<IntNumber>0</IntNumber>
|
||||
<FirstString>((portb & 0x00000002) >> 1 & 0x2) >> 1</FirstString>
|
||||
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F0B00000000000000000000000000000000000000DE030008</SecondString>
|
||||
</Wi>
|
||||
</LogicAnalyzers>
|
||||
<DebugDescription>
|
||||
<Enable>1</Enable>
|
||||
<EnableFlashSeq>0</EnableFlashSeq>
|
||||
|
@ -260,7 +315,7 @@
|
|||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>18</CpuCode>
|
||||
<DebugOpt>
|
||||
|
|
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -1338,11 +1338,6 @@
|
|||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
area maram,data,readwrite
|
||||
|
||||
VarTime dcd 0
|
||||
|
||||
EXPORT VarTime
|
||||
|
||||
|
||||
; ===============================================================================================
|
||||
|
@ -23,7 +25,7 @@ TimeValue equ 900000
|
|||
|
||||
|
||||
;Section ROM code (read only) :
|
||||
area moncode,code,readonly
|
||||
area moncode,code,readonly
|
||||
|
||||
|
||||
|
||||
|
@ -41,19 +43,19 @@ TimeValue equ 900000
|
|||
|
||||
Delay_100ms proc
|
||||
|
||||
ldr r0,=VarTime
|
||||
ldr r0,=VarTime ; r0=VarTime=0; l'adresse de r0=0x20000000 (c'est linker qui décide ou stocké r0)
|
||||
|
||||
ldr r1,=TimeValue
|
||||
str r1,[r0]
|
||||
ldr r1,=TimeValue ; r1=TimeValue=900000; l'adresse de r1=0x000DBBA0
|
||||
str r1,[r0] ; la valeur de r1 stocké à l'adresse de r0=0x20000000
|
||||
|
||||
BoucleTempo
|
||||
ldr r1,[r0]
|
||||
ldr r1,[r0] ; r1=r0=900000
|
||||
|
||||
subs r1,#1
|
||||
str r1,[r0]
|
||||
bne BoucleTempo
|
||||
subs r1,#1 ; r1=r1-1=899999
|
||||
str r1,[r0]; la valeur de r1 stocké à l'adresse de r0=0x20000000
|
||||
bne BoucleTempo ; si z!=0 reboucler (z=1 si r0=0)
|
||||
|
||||
bx lr
|
||||
bx lr ; return r0
|
||||
endp
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
@ -153,7 +153,40 @@
|
|||
<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>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>16</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134220296</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\Src\principal.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\BacASable\Src/principal.c\16</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>1</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>55</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134220362</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\Src\Cligno.s</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\BacASable\Src/Cligno.s\55</Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
|
@ -174,7 +207,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>
|
||||
|
@ -200,7 +233,7 @@
|
|||
<Wi>
|
||||
<IntNumber>0</IntNumber>
|
||||
<FirstString>((portb & 0x00000002) >> 1 & 0x2) >> 1</FirstString>
|
||||
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008</SecondString>
|
||||
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F0D0000000000000000000000000000000000000096020008</SecondString>
|
||||
</Wi>
|
||||
</LogicAnalyzers>
|
||||
<DebugDescription>
|
||||
|
|
|
@ -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>
|
||||
|
@ -357,7 +357,7 @@
|
|||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
<IncludePath>.\Driver</IncludePath>
|
||||
</VariousControls>
|
||||
</Aads>
|
||||
<LDads>
|
||||
|
@ -1338,11 +1338,6 @@
|
|||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
|
|
@ -9,19 +9,68 @@
|
|||
|
||||
;Section RAM (read write):
|
||||
area maram,data,readwrite
|
||||
FlagCligno dcb 0
|
||||
|
||||
|
||||
export FlagCligno
|
||||
export timer_callback
|
||||
|
||||
; ===============================================================================================
|
||||
|
||||
; char FlagCligno;
|
||||
|
||||
;void timer_callback(void)
|
||||
;{
|
||||
; if (FlagCligno==1)
|
||||
; {
|
||||
; FlagCligno=0;
|
||||
; GPIOB_Set(1);
|
||||
; }
|
||||
; else
|
||||
; {
|
||||
; FlagCligno=1;
|
||||
; GPIOB_Clear(1);
|
||||
; }
|
||||
;
|
||||
;}
|
||||
|
||||
|
||||
;Section ROM code (read only) :
|
||||
area moncode,code,readonly
|
||||
; écrire le code ici
|
||||
|
||||
|
||||
include DriverJeuLaser.inc
|
||||
|
||||
; r0 : l'adress de FlagCligno
|
||||
; r1 :
|
||||
; r2 : valeur du flag
|
||||
|
||||
timer_callback proc
|
||||
push {lr}
|
||||
ldr r0,=FlagCligno ; mets l'adresse de FlagCligno dans r0
|
||||
ldr r2, [r0] ; mets dans r2 la valeur du flag
|
||||
cbz r2, alors ; FlagCligno = 0 => Mise a 1
|
||||
cbnz r2, sinon ; FlagCligno = 1 => Mise a 0
|
||||
|
||||
alors
|
||||
; mets FlagCligno a 1
|
||||
mov r2, #0x1
|
||||
str r2, [r0]
|
||||
; GPIOB_Clear(1)
|
||||
mov r1, #1
|
||||
bl GPIOB_Clear
|
||||
|
||||
|
||||
sinon
|
||||
; mets FlagCligno a 0
|
||||
mov r2, #0x0
|
||||
str r2, [r0]
|
||||
; GPIOB_Set(1)=
|
||||
mov r1, #1
|
||||
bl GPIOB_Set
|
||||
pop {pc}
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
#include "DriverJeuLaser.h"
|
||||
|
||||
void timer_callback(void);
|
||||
extern void timer_callback(void);
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
@ -21,6 +22,8 @@ CLOCK_Configure();
|
|||
|
||||
|
||||
// Activation des interruptions issues du Timer 4
|
||||
Timer_1234_Init_ff(TIM4, 7200000);
|
||||
Active_IT_Debordement_Timer(TIM4, 2, timer_callback);
|
||||
// Association de la fonction à exécuter lors de l'interruption : timer_callback
|
||||
// cette fonction (si écrite en ASM) doit être conforme à l'AAPCS
|
||||
|
||||
|
@ -42,20 +45,20 @@ while (1)
|
|||
}
|
||||
}
|
||||
|
||||
char FlagCligno;
|
||||
// char FlagCligno;
|
||||
|
||||
void timer_callback(void)
|
||||
{
|
||||
if (FlagCligno==1)
|
||||
{
|
||||
FlagCligno=0;
|
||||
GPIOB_Set(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
FlagCligno=1;
|
||||
GPIOB_Clear(1);
|
||||
}
|
||||
|
||||
}
|
||||
//void timer_callback(void)
|
||||
//{
|
||||
// if (FlagCligno==1)
|
||||
// {
|
||||
// FlagCligno=0;
|
||||
// GPIOB_Set(1);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// FlagCligno=1;
|
||||
// GPIOB_Clear(1);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
|
|
Loading…
Reference in a new issue