AnsweredAssumed Answered

STM8S0003K3 only one TIM2 capture/compare interrupt function, despite 3 TIM2 channels?

Question asked by Lei Sun on Oct 21, 2017
Latest reply on Oct 22, 2017 by Clive One

Hi all,

I would like to realize the fading LED using timer2 of STM8S003K3. The requirement is not to use the default PWM output pin but the normal GPIO pin. So I want to use the update and compare interrupt functions of TIM2 to write High and Low of the normal GPIO pins. The idea is similar to the default PWM output but just manually change the output level of the GPIO in the interrupt function.

 

My question is why I can only find 1 TIM2 capture/compare interrupt function mapping with IRQ no. 14 (IRQ no.15 and 16 are reserved). There are 3 TIM2 channels which means there must be 3 independt interrupt functions. May I use the reserved IRQ no. for the interrupt functions?

 

Here is the handbook of STM8S0003K/F3:

http://www.st.com/content/ccc/resource/technical/document/datasheet/42/5a/27/87/ac/5a/44/88/DM00024550.pdf/files/DM00024… 

In chapter 7, you can find the interrupt vector mapping.

 

Thanks in advance.

 

Bo

Outcomes