Posted on March 18, 2015 at 13:44
Hello,
I'd like to use channel 2 and channel 4 of TIM2 as input capture. Channel 2 work fine, but channel seems returning the timer counter. Here's the code:
GPIO_InitTypeDef GPIO_InitStructure;
TIM_...
Posted on February 28, 2015 at 14:25 The original post was too long to process during our migration. Please click on the attachment to read the original post.
Posted on March 28, 2015 at 16:32Thanks clive. You said that I have to measure 3 consecutive values to get duty and frequency. The timer interrupt is executed every time the timer overflow as the period is set to 0xFFFFFFFF. so how can I observe bot...
Posted on March 28, 2015 at 14:24
Hi, I assigned the period of timer 2 interrupt to 0xFFFFFFFF and the prescaler 0. While in the interrupt, I put the coding below. Is it correct?
cc[0] = TIM_GetCapture2(TIM2)/72;
delta[0] = cc[0] - cc[1];...
Posted on March 26, 2015 at 19:50I tried to read the pin state using GPIOx->IDR, in order to know whether the consecutive rising edges is 20 ms, but it showed the values of 65535, 65487 and 65519. Is this results that I should obtain? If no, may you...
Posted on March 26, 2015 at 18:00Hi, I encountered a problem that a very large and incorrect value pop out in the middle of the data I obtained even after applying your suggestion. How can I solve this problem? Thanks in advance.