Hi,
I was given this suggestion on this forum "if PIO is driving a pulse output, and you've arranged for that to be on an odd-numbered GPIO pin (PWM B channel), PWM can simultaneously count the number of pulses generated."
But I cannot figure out how this may work. When I call gpio_set_function(SOME_PIN, GPIO_FUNC_PWM), then this pin will be connected to PWM and disconnected from PIO, right? I do not see any output on it after that.
Is there some trick to count output from PIO?
( I am using PIO to drive a stepper and counting steps is very important).
Thank you
I was given this suggestion on this forum "if PIO is driving a pulse output, and you've arranged for that to be on an odd-numbered GPIO pin (PWM B channel), PWM can simultaneously count the number of pulses generated."
But I cannot figure out how this may work. When I call gpio_set_function(SOME_PIN, GPIO_FUNC_PWM), then this pin will be connected to PWM and disconnected from PIO, right? I do not see any output on it after that.
Is there some trick to count output from PIO?
( I am using PIO to drive a stepper and counting steps is very important).
Thank you
Statistics: Posted by jhnlmn — Thu Sep 26, 2024 5:36 am