AnsweredAssumed Answered

Change the interrupt frequency

Question asked by Raul Galbany on Apr 11, 2018
Latest reply on Apr 11, 2018 by Clive One

Hello,

I'm just starting to create a basic code in order to play with the timer interrupt.

Now I have a little problem: my led blinks but I want to change the frequency when I push the button. Why this code inside the main function don't change the frequency?

 

while

 {

if (!HAL_GPIO_ReadPin(BotoBlau_GPIO_Port, BotoBlau_Pin))      htim14.Init.Period = 10000;

else  htim14.Init.Period = 2000;

}

 

Thanks!

Raul

Outcomes