Posted on September 19, 2016 at 10:54Hello! I use a basic timer 6 to make a simple delay. Here is my code:#define DELAY_TIME 10#define PB2_ON() GPIOB->BSRRL = GPIO_Pin_2#define PB2_OFF() GPIOB->BSRRH = GPIO_Pin_2//Config PortB_P...
Posted on September 23, 2016 at 09:35Hello clive1!I do not have a lot of experience in the µc programming, but what is the difference between using a free-runnig counter DWT and a basic timer such a Timers 6/7? Except their resolution and clock fre...
Posted on September 22, 2016 at 12:15Thanks again! You are right. But i have one more idea. What if i use timer in one/pulse mode? Like that://Timer 7 configvoid Timer7_Init(void){ RCC->APB1ENR |= RCC_APB1Periph_TIM7; // Enable Timer 7 clock TIM...
Posted on September 21, 2016 at 11:38Thanks for your help clive1!But i have one question more.If i use your code, and it will so happen, that i go into these delay_function and the value of TIM_CNT register is 65534. So i'll become a wrong time dela...