forkattu lähteestä acco/chti23
PWM marche
This commit is contained in:
vanhempi
c2aa407cec
commit
5df80282a8
2 muutettua tiedostoa jossa 12 lisäystä ja 5 poistoa
|
@ -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}
|
||||
|
@ -72,7 +73,11 @@ callbackSon proc
|
|||
|
||||
ldr r0, =SortieSon
|
||||
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}
|
||||
|
|
|
@ -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);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
|
Ladataan…
Viittaa uudesa ongelmassa