This commit is contained in:
Axel Olougouna 2023-03-24 17:41:53 +01:00
parent 15cdcee56f
commit f45f8dc6e7
4 changed files with 40 additions and 23 deletions

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>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -267,7 +267,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>

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>
@ -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>&lt;Project Info&gt;</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayTarg>0</LayTarg>
<LayPrjMark>1</LayPrjMark>
</Layer>

View file

@ -1,6 +1,6 @@
PRESERVE8
THUMB
include Driver/DriverJeuLaser.inc
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
@ -10,7 +10,7 @@
;Section RAM (read write):
area maram,data,readwrite
FlagCligno dcb 1
; ===============================================================================================
@ -20,11 +20,32 @@
;Section ROM code (read only) :
area moncode,code,readonly
; écrire le code ici
EXPORT timer_callback
timer_callback proc
push {lr}
ldr r0,=FlagCligno
ldr r1,[r0]
cbz r1, zero
mov r1,#0
str r1,[r0]
mov r0,#1
bl GPIOB_Set
pop {pc}
zero
mov r1,#1
str r1,[r0]
mov r0,#1
bl GPIOB_Clear
pop {pc}
endp
END

View file

@ -2,7 +2,7 @@
#include "DriverJeuLaser.h"
void timer_callback(void);
extern void timer_callback(void);
int main(void)
{
@ -17,8 +17,8 @@ CLOCK_Configure();
// configuration du Timer 4 en débordement 100ms
//** Placez votre code là ** //
Timer_1234_Init_ff(TIM4, 7200000);
Active_IT_Debordement_Timer(TIM4, 2, timer_callback);
// Activation des interruptions issues du Timer 4
// Association de la fonction à exécuter lors de l'interruption : timer_callback
@ -30,7 +30,7 @@ CLOCK_Configure();
// configuration de PortB.1 (PB1) en sortie push-pull
GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
@ -42,7 +42,8 @@ while (1)
}
}
char FlagCligno;
/*char FlagCligno;
void timer_callback(void)
{
@ -58,4 +59,4 @@ void timer_callback(void)
}
}
*/