I’m using a PWM output from the CPU to send step pulses to a stepper motor controller. (I know that isn’t a sensible long-term approach).
I have a sequencer class running its own thread that controls a sequence of operations. My intention was to change the speed of the motor over the course of the sequence. However, I find that changing the speed causes the PWM output to stop (at zero volts; I’ve observed this with both a logic analyser and a voltmeter, including with the motor inactive). If I run the sequence without changing the speed, all is well.
I’ve tried lots of combinations but, for the moment at least, I’m unable to change the speed without stopping the PWM output altogether. Once the output has ‘stopped’, it seems a full reset is required to start it again.
I’m connecting to the PWM output using a Breadboard_X1. .NetMF 4.2. There are lots of apparently-out-of-date examples for this sort of thing, so to be clear, this is how I initialize the PWM output:
I've tried different pins and minimizing the application, but I've been unable to find a solution. Anyone know of an explanation?