Enabling interrupts
Hi,
I'm new to STM8 (usually I develop from STM32) and I'd like to know how can I enable interrupts.
In STM32, I usually configure the peripheral interrupt enable bit and also in the NVIC I enable the interrupt to pass it from peripheral to CPU.
In STM8S I thought the approach was the same.
I'm finding the peripheral interrupt enable (e.g. the interrupt enable for the timer on TIM1_IER register) but I'm not finding how to enable it (and if needed) from the CPU side.
In addition, I read that at the end of the interrupt routine, a IRET instruction is required.
Should I manage it? And how?
By the way I'm using ST Visual Develop with COSMIC compiler and the CPU I'm referring to is the STM8S003K3.
Is there a working example or simple explanations?
EDIT: In the reference manual I also found
#asm
PUSH ISR_CC
POP CC
#endasm
but don't know what is ISR_CC
Thanks and best regards.
