Probably you have a non-coherence between stm8s_it.c, stm8s.it_h and interrupt_vector.c. Why you are not using the template provided by ST in the standard library. It is easier and faster for start-up ? That was my case when I started enjoying with STM8S micros. Tell me if It is OK now. Regards, MCU Lüfter
I am also having a problem similar to you. That is in my case also the timer counter is not getting increased. But going through the thread I cant understand what changes have helped you to overcome the problem. So can you please tell me explicitly which registers were changed and what are the values that gave you the desired output? Thank you.
I didn't used it but you can start with the provided examples on SPI and then to update it to your requirement. If you have some news thanks to share. With regards, MCU Lüfter