I am working on STM8S003F3 micro controller and unable to configure the alternate functions Timer 2 - channel 1[AFR0], Timer 1 - channel1[AFR0] and Timer 1 - channel 2[AFR0] for PC5/ SPI_SCK[TIM2_ CH1], PC6/ SPI_MOSI[TIM1_ CH1] and PC7/ SPI_MISO[TIM1_ CH2] respectively.
I tried as mentioned below by referring datasheet (page no 42 and 45, attached)
OPT->OPT2 = 0x01;
can some one help me out on this?
it will be really helpful and i can move forward.
Thanks in advance