diff --git a/PjtKEIL_StepSon/Src/GestionSon.s b/PjtKEIL_StepSon/Src/GestionSon.s index c4d4ad3..ffb2d69 100644 --- a/PjtKEIL_StepSon/Src/GestionSon.s +++ b/PjtKEIL_StepSon/Src/GestionSon.s @@ -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} diff --git a/PjtKEIL_StepSon/Src/principal.c b/PjtKEIL_StepSon/Src/principal.c index b60373a..8ea5be1 100644 --- a/PjtKEIL_StepSon/Src/principal.c +++ b/PjtKEIL_StepSon/Src/principal.c @@ -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); + //============================================================================