Replies: 1 comment 1 reply
-
I don't think the SDK has any APIs for this, but you can do it using direct register access from the It's so asymmetric and limited that I am loathe to add it to the core because there are so many cases when it either can't work due to HW constraints or doesn't come back with the info you think it will. I'm happy to get a PR, though, if you can come up with a sensible API for it! |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Im reading the pico forums and there seems to be a mention of using the PWMs to be able to get the frequency of an input signals. So far what i have gathered is (no guaranteed if its true):
I searched the rp2040 datasheet and came up with something that it might be it
I think that this must be it as it is mentioned that it only works on PWM B pins (odd numbered GPIO). And the given example even is for measuring duty cycle (but not frequency, maybe can be adjusted to read freqency too). Does this core have an API for this?
The most important characteristics that i want to know is if this process is non-blocking. If this process of reading the frequency is non-blocking this would be very great for what im currently trying to do. I can free up a lot of clock cycles this way, If not then i guess ill just have to stick with interrupts.
Nonetheless it would be nice if the core has this feature, as i can see a lot of potential use cases even if it is blocking.
Beta Was this translation helpful? Give feedback.
All reactions