Timer -> generate number of pulses
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-07-06 10:04 PM
Posted on July 07, 2015 at 07:04
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? #stm32f103
Labels:
- Labels:
-
STM32F1 Series
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-07-07 8:59 AM
Posted on July 07, 2015 at 17:59
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.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
