Author Topic: ETR not counting STM8S103  (Read 534 times)

0 Members and 1 Guest are viewing this topic.

Offline SajeevTopic starter

  • Contributor
  • Posts: 24
  • Country: in
ETR not counting STM8S103
« on: August 02, 2024, 04:57:59 pm »
Dear Forum members,
I tried to count an external square wave on ETR pin PD3 using external clock mode2 on STM8S103F3 chip. The timer1 counter always show 0. I followed the RM0016 manual to set up the external clock 2 but was unsuccessful. If any members have successfully counted using ETR as external clock kindly advice. below is the code I used

          mov CLK_CKDIVR,#$0     ; set max internal clock 16mhz
     bset TIM1_ETR,#6      ; External clock mode 2 enabled
     bset TIM1_CR1,#0      ; enable timer1
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4340
  • Country: nl
Re: ETR not counting STM8S103
« Reply #1 on: August 02, 2024, 06:59:47 pm »
Please do not double post the same question.

For others see the more extended second post the OP made. https://www.eevblog.com/forum/microcontrollers/stm8s103-etr-not-counting/?topicseen 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf