Pulse counter controlled by hardware timing for frequency measurement
-
- Posts: 151
- Joined: Thu Jun 15, 2017 4:54 am
- Location: New Zealand
Re: Pulse counter controlled by hardware timing for frequency measurement
Strange - hopefully one of the ESP guys can comment...
Re: Pulse counter controlled by hardware timing for frequency measurement
I tried to configure RMT-out as GPIO 12, and PCNT-CTRL-in as GPIO 13. Then I externally connected the GPIO's with a jumper wire. This seems to preserve the RMT signal.
Will the PCNT module work in this case? I don't see the counter increment though. Or do I need some other modification in my PCNT setup?
Thanks.
Edit: There was a mistake in my PCNT configuration, I am getting some value on my counter.
Will the PCNT module work in this case? I don't see the counter increment though. Or do I need some other modification in my PCNT setup?
Thanks.
Edit: There was a mistake in my PCNT configuration, I am getting some value on my counter.
-
- Posts: 151
- Joined: Thu Jun 15, 2017 4:54 am
- Location: New Zealand
Re: Pulse counter controlled by hardware timing for frequency measurement
I noticed that you were counting up on one edge direction, down on the other, which would cause the counter to oscillate between two values. Change both to up, or both to down, to have it count monotonically. Sorry I didn't mention this at the time, as I wasn't sure what your application is.
I'm not sure why you can't share the GPIO. I wonder if the PCNT initialisation is modifying the GPIO mode in other ways that I didn't notice myself? It might be worth diving into the source for the PCNT init and see what it's doing to the GPIO mode.
I'm not sure why you can't share the GPIO. I wonder if the PCNT initialisation is modifying the GPIO mode in other ways that I didn't notice myself? It might be worth diving into the source for the PCNT init and see what it's doing to the GPIO mode.
Who is online
Users browsing this forum: No registered users and 70 guests