Replies: 3 comments 4 replies
-
This sounds like a problem suited for the PIOs of the RP2040. |
Beta Was this translation helpful? Give feedback.
4 replies
-
ESP32 PMW is based on LED Control (LEDC), not MCPWM PCNT solution - Best Frequency Meter ever made with ESP32 - awesome! |
Beta Was this translation helpful? Give feedback.
0 replies
-
esp32/MCPWM: Add motor control MCPWM driver. #12345 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need to precisely measure positions of edges of a digital signal from a sensor.
ESP32 offers the Input Capture functionality in the MCPWM block: https://docs.espressif.com/projects/esp-idf/en/v4.2/esp32/api-reference/peripherals/mcpwm.html#capture .
Unfortunately, it seems that this feature is not supported (yet?) by the PWM driver: https://docs.micropython.org/en/latest/esp32/quickref.html#pwm-pulse-width-modulation .
Of course, I can access it directly via registers, as described in https://github.com/micropython/micropython/blob/master/docs/esp32/tutorial/peripheral_access.rst , but it may be difficult to register multiple edges of a relatively fast input signal that way.
Generally, what I need is Input Capture cooperating with fast IRQ or (better) DMA storing the time positions of consecutive rising and falling edges in a circular buffer.
Can it be easily implemented in micropython on ESP32?
TIA, best regards,
Wojtek
Beta Was this translation helpful? Give feedback.
All reactions