How immediately zero the PCNT using GPIO?
Posted: Mon Jan 22, 2018 7:08 pm
I have a application where I want to zero a PCNT when a GPIO goes low. It's a home flag on an absolute stepper. I was expecting that the control input to the PCNT could be used to reset the counter, but that does not seem to be the case. Have I missed anything?
As far as I can see, the only method to reset the counter from an external input is to create an ISR for the GPIO input and in that routine put the software commands to reset the PCNT. This method is simple enough but I'm afraid it will be somewhat slow.
Is there any possibility of adding reset to the PCNT control inputs in the future? I suspect there are many use cases where the PCNT needs to be immediately reset based on an external input.
Clark
As far as I can see, the only method to reset the counter from an external input is to create an ISR for the GPIO input and in that routine put the software commands to reset the PCNT. This method is simple enough but I'm afraid it will be somewhat slow.
Is there any possibility of adding reset to the PCNT control inputs in the future? I suspect there are many use cases where the PCNT needs to be immediately reset based on an external input.
Clark