Does anyone have a good solution for measuring a continues PWM signal?
Posted: Tue Aug 08, 2023 12:18 pm
Hello,
I have been trying to come up with a good clean way to measure PWM input to my device. I need both Frequency and Pulse width.
On the normal ESP32 I was able to use MCPWM but on the C3 and S2 the MCPWM does not exist. I have tried to experiment with RMT and it hasn't went as well as I expected.
I input a PWM signal into my device that never stops. It will vary in frequency and pulse width and that is it.
I have a frequency and Pulse with range that is accepted as normal and anything above or below that needs to be flagged as error so that user can be notified that the input is out of specs.
I have done some digging around trying to find a way to do this with a peripheral so I could avoid the old, Edge Detection Timer tick combo that will be firing interrupt all the time.
Any help would be appreciated, I know someone has found a good solution.
I have been trying to come up with a good clean way to measure PWM input to my device. I need both Frequency and Pulse width.
On the normal ESP32 I was able to use MCPWM but on the C3 and S2 the MCPWM does not exist. I have tried to experiment with RMT and it hasn't went as well as I expected.
I input a PWM signal into my device that never stops. It will vary in frequency and pulse width and that is it.
I have a frequency and Pulse with range that is accepted as normal and anything above or below that needs to be flagged as error so that user can be notified that the input is out of specs.
I have done some digging around trying to find a way to do this with a peripheral so I could avoid the old, Edge Detection Timer tick combo that will be firing interrupt all the time.
Any help would be appreciated, I know someone has found a good solution.