2009-02-03 01:24 AM
2011-05-17 12:57 AM
I have TIM 1 setup as an input capture, can see the pin toggling on GPIO4 Pin 2, interrupts are being generated by OC1 which is also set up on TIM1 and these work ok, but no interrupts or flags for input capture 1 is being set..
Any Ideas?? Thanks, Martin Pin Setup: GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull; GPIO_InitStructure.GPIO_IPInputConnected = GPIO_IPInputConnected_Enable; GPIO_InitStructure.GPIO_Alternate = GPIO_InputAlt1; GPIO_Init(GPIO4,&GPIO_InitStructure); Debug: GPIO4 Bit 2 Toggles SCU->GPIOIN4 0x00000004 bit 2 high TIM1->CR1 0x8144 IEDG1 Rising Egde OC1E OC1 Enabled OLVL1 High EN Counter Enabled TIM1->CR2 0xC000 IC1IE IRQ Enabled OC1IE IRQ Enabled TIM1->SR 0x6800 OCF2 OC2 Match TOF Timer overflow OCF1 OC1 Match TIM1->CNTR is incressing (running)