- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I am new to PSOC
I am trying to measure the duty cycle of PWM signal, and I do get the high count right, but I do not get the low count and the period.
I attached the Oscilloscope screen, from the PWM module output on pin m_2.
Attached the main C file.
Attached the UART output.
Thanks.
Hanan.
Solved! Go to Solution.
- Tags:
- duty cycle
- psoc6
- pwm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hanan,
I attached the new project which can measure the duty cycle of PWM signal.
You need to check the PWM capture and reload trigger signal. And the getcapture API parameters.
capture2 = Cy_TCPWM_Counter_GetCapture(Counter_2_HW, Counter_2_CNT_NUM);
capture = Cy_TCPWM_Counter_GetCapture(Counter_1_HW, Counter_1_CNT_NUM);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you attached your test project?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hanan,
I attached the new project which can measure the duty cycle of PWM signal.
You need to check the PWM capture and reload trigger signal. And the getcapture API parameters.
capture2 = Cy_TCPWM_Counter_GetCapture(Counter_2_HW, Counter_2_CNT_NUM);
capture = Cy_TCPWM_Counter_GetCapture(Counter_1_HW, Counter_1_CNT_NUM);