2015-07-06 10:04 PM
Hello,
I would like to generate number of pulses on timer3. I am using two channels PB6&PB7which runs at different period, but on same timer. For that reason I am using OC1&OC2 and I am counting number of pulses at each channel at interrupt service routine. The problem is,that I do not know how to disable interrupt on single channel, since it happens, that both interrupts stops.Could you point me to some example how to stop single only OCx interrupt? #stm32f1032015-07-07 08:59 AM
In the SPL you'd
/* Disable the CC1 Interrupt Request */ TIM_ITConfig(TIM3, TIM_IT_CC1, DISABLE); /* Disable the CC2 Interrupt Request */ TIM_ITConfig(TIM3, TIM_IT_CC2, DISABLE);And flag to yourself not to check the IT bits for these in the IRQ Handler. Note the Enable/Disable gates the IT bits to the NVIC, they still assert in the status register whether they are enabled or not.