Skip to main content
waheed901
Associate III
August 13, 2015
Question

PROBLEM: STM32F4 External Pulse counting by using HAL Libraries

  • August 13, 2015
  • 3 replies
  • 836 views
Posted on August 13, 2015 at 07:26

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    3 replies

    Amel NASRI
    ST Technical Moderator
    August 13, 2015
    Posted on August 13, 2015 at 15:15

    Hi w.a,

    I think that the counting has to be done in the call back of the timer's IRQ handler.

    You may refer to the example STM32Cube_FW_F4_V1.7.0\Projects\STM324xG_EVAL\Examples\TIM\TIM_InputCapture to get some insight.

    -Mayla-

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Tesla DeLorean
    Guru
    August 13, 2015
    Posted on August 13, 2015 at 17:56

    He's NOT asking about Input Capture, which btw has some grave math issues.

    What's missing are External Clock Source examples for the TIM, using HAL

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    waheed901
    waheed901Author
    Associate III
    August 14, 2015
    Posted on August 14, 2015 at 03:57

    Thanks Mayla and Clive for the replies:

    Mayla, I have gone through the inputcapture program, in fact I am using that for frequency counting by using internal clock on the  interrupt generated by the external signals, but this project is some what different, I want to have just counts of the external rising pulses but unable to configure by using HAL libraries. I am just a starter to board things, so need step by step guidance/examples to understand and implement things. 

    Clive is right, HAL's examples and guidance is some what limited, while there are lot many examples/forums/posts of Firmware available.