Skip to main content
ganesan jayaraman
Associate
October 23, 2017
Question

[ATT]9960

  • October 23, 2017
  • 2 replies
  • 1064 views
Posted on October 23, 2017 at 19:44

Problems counting pulses between 5hz-100hz on STM8s003f3p

hi

kindly help my design.

     i am using stm8s003f3p micro-controller. timer 1 input capture unit doesn't work as i intended. i searched web forums and blogs i couldn't find  solution for counting pulses between 5hz-100hz. i used standard peripheral library to change according to my need.i modifed tim1 input capture example to count pulse and send period values over UART1.

i here by attach my code as well.please help me to find solution.

    This topic has been closed for replies.

    2 replies

    Simon V.
    ST Employee
    October 25, 2017
    Posted on October 25, 2017 at 10:50

    Hello,

    You have chosen the correct example. Could you share more detail about the facing issue please ? Which hardware are you using ? It seems that you are sending result via UART with timer interrupt which could be helpful if you are facing unwanted behavior....

    Here some additional lecture to STM8S AN2822 :

    https://www.fmf.uni-lj.si/~ponikvar/STM32F407%20project/Timer2_Counting.pdf

    Regards,

    Simon

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
    PRATHAP KS
    Visitor II
    November 2, 2017
    Posted on November 02, 2017 at 11:42

    Hello simon, 

    first He want to change the timer value.

    second he want read the timer value.