PWM marche
This commit is contained in:
parent
c2aa407cec
commit
5df80282a8
2 changed files with 12 additions and 5 deletions
|
@ -37,8 +37,9 @@ IndiceCourrant dcd 0
|
|||
; SortieSon = SortieSon/(65534/719);
|
||||
; IndiceCourrant++;
|
||||
; }
|
||||
; PWM_Set_Value_TIM3_Ch3(SortieSon);
|
||||
;}
|
||||
|
||||
EXPORT callbackSon
|
||||
callbackSon proc
|
||||
push{lr}
|
||||
push{r4}
|
||||
|
@ -74,6 +75,10 @@ callbackSon proc
|
|||
str r3, [r0] ; valeur de r3 à l'adresse dans r0 = adresse de SortieSon
|
||||
; }
|
||||
|
||||
; PWM_Set_Value_TIM3_Ch3(SortieSon);
|
||||
mov r0 , r3 ; passage de valeur de SortieSon en arg
|
||||
bl PWM_Set_Value_TIM3_Ch3
|
||||
|
||||
RienFaire
|
||||
pop {r5}
|
||||
pop {r4}
|
||||
|
|
|
@ -14,12 +14,14 @@ 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);
|
||||
|
||||
PWM_Init_ff( TIM3, 3, 720);
|
||||
|
||||
GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
|
||||
|
||||
Active_IT_Debordement_Timer( TIM4, 2, callbackSon );
|
||||
|
||||
GPIO_Configure(GPIOB, 1, OUTPUT, OUTPUT_PPULL);
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
|
Loading…
Reference in a new issue