cancel
Showing results for 
Search instead for 
Did you mean: 

Timer 3 prescaler does nothing

robertwood9
Associate III
Posted on October 30, 2009 at 14:29

Timer 3 prescaler does nothing

10 REPLIES 10
Yoshimitsu_Manji_clan
Associate II

I also faced this problem where ARR and PSC values had no effect on output waveforms using STM32F446RE. The issue got solved my removing interrupt function statement from inside of the while loop and placing it within the main function but outside while loop. So lesson learned is that do not keep any function prototypes inside while loop if it is not meant to be there. Example is as shown below:-

#include "dac.h"
#include <stdio.h>
#include <stdint.h>
#include<math.h>
#include "stm32f4xx.h"

int main(void)
{
	dac_gpio_init();
	dac_timer_init();
	TIM2_IRQHandler();
	tim2_callback();
		while (1)
		{

		}
}

 hope it helps...have a nice day.