This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0L1305: Count external clock in the MCU

Part Number: MSPM0L1305

Hi team,

My customer wants to know how to count the external clock in the microcontroller.
According to the user manual (P933, External Signal Trigger section), it seems that it can be done.
But I am not sure what the pin number is and how to set the timer (which register has the clock setting of the timer).

It would be appreciated if you could share how to do it.

Thank you in advance.

Best Regards,

Kenley

  • Hi Kenley,

    Please refer to the page 951 of user manual.(18.2.3.2.1 Edge Count).

    Thanks,

    Yuhao

  • Hi Zhao,

    Thank you for the reply.

    My customer would like to know more details. 

    Could you explain us how to do it 

    This is the detailed question from customer:

    For example, if you use the PA0 pin as the input pin for an external clock and want to decrease the timer count on input rise.

    1. How do I set the pin? Where is the register for setting the PA0 pin as the input pin of the external clock?

    2. After setting the pin, where and how can other settings (TIMx.CCCTL_xy[0/1].ACOND, TIMx.CTRCTL.CAC, etc.) be set to operate the timer to use to count the external clock?

    3. Where should I enter the value if I want to count 100?

    4. If the external clock is set, will all four 16-bit general-purpose timers run on the external clock, or can they be set for each timer? If possible, please let me know how to set it up.

    5. Regarding pins that can be used for external clocks, is "pin with timer function" such as TIMG1_C0 can be used ?

    Thank you in advance.

    Best Regards,

    Kenley 

  • Hi Kenley,

    In fact, you can find an example code about edge count in the SDK.

    Maybe customer can refer to it first and evaluate the function easily.

    Thanks,

    Yuhao