LOPY Timer interrup
-
Hi,
I need to generate a square signal on a pin at a precise frequency as the PWM function could do.
But i need to adjust this frequency in real time .. mmm.. the goal is to generate a square signal to control a stepper motor including acceleration phases.So, i'm searching something like a timer interrupt where i could adjust frequency outside the handler.
i found that :
https://forum.pycom.io/topic/897/timer-and-uart-confugrationbut it doesnt compile on my LOPY ?
Could you please give me some help or ideas to solve my problem ?
thanks
-
@jmarcelino
thanks. I'll wait and try.
-
@easytryer
We introducing a Python interface to the RMT peripheral very soon (already in testing) I think it’ll do what you neeed
-
hi.
thanks for this informations.
Is there a way to acheive my goal or have i to return on more real time uController ?regards
-
This post is deleted!
-
@easytryer The example you refer to is for a WiPy 1 device. That's not compatible to a WiPy 2 or LoPy. using a time interrupt is not recommended, since interrupts on the Lopy (and all the other Espressif devices) have a vary long and varying latency (see https://forum.pycom.io/topic/936/pin-interrupt-latency). The test was made for a Pin interrupt, but for timer interrupts you should expect the same behavior.