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.

input capture

Based on the below example, 2 question wanted to be asked.

1> when i use signal generator instead of the pwm input, the fix duty can't be captured correct.???

i only want to get the right duct(pwm input).

2> when i use this example, but i remove the below function, the duty still wrong.

//DL_TimerG_setCoreHaltBehavior(CAPTURE_0_INST, DL_TIMER_CORE_HALT_IMMEDIATE); //debug use!
//DL_TimerG_setCoreHaltBehavior(PWM_0_INST, DL_TIMER_CORE_HALT_IMMEDIATE);

  • Hi RU,

    I don't find the device you used, please show your information and then it will be better understanding.

    I assume you are using MSPM0 device, like L or G series.

    1> when i use signal generator instead of the pwm input, the fix duty can't be captured correct.???

    It doesn't mattter. Whcih SDK version do you refer to use? I suggest you use 1.10 or newer which has fixed some issues about the "duty cycles capture function code".

    2> when i use this example, but i remove the below function, the duty still wrong.

    This function is used for debug, if you enable it, and then you will find that the timer counter will stop couting when you make the code halt, for example - breakpoint. When you disable it, you will find the first capture value is wrong when you run the code from a halt status.

    B.R.

    Sal

  • Hi RU,

    Haven't heard from you in a while, and I will close the thread.

    If you have any further question, you can reply to this thread or file a new one.

    If the post helped solve your issue, please click on the 'This resolved my issue' button.

    B.R.

    Sal