-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial 8pwm #260
base: dev
Are you sure you want to change the base?
Initial 8pwm #260
Conversation
Yes, the StepperDriver8PWM::setPwm(float Ualpha, float Ubeta) function is intended to be called by the setPhaseVoltage function in order to set the appropriate PWM duty cycles based on the calculated alpha and beta voltages. The setPhaseVoltage function performs the necessary calculations to transform the input voltages Uq and Ud to the alpha and beta voltages required for the 8 PWM control. These alpha and beta voltages are then passed as arguments to the setPwm function, which sets the appropriate duty cycles on the PWM pins. So, the setPhaseVoltage and StepperDriver8PWM::setPwm functions are intended to work together as part of a larger system for driving a 2-phase stepper motor using 8 PWM pins. |
The CORDIC setup should be done in the application.
Hey, Looks like a good start, but:
|
Hey, also it doesn't pass the checks for any architectures, not even STM32... |
Yes, it still need some work, but im glad you like the general idea. Will organize it a bit and get a clean dev branch. Maybe I should define a HAS_CORDIC ? And list the MCU´s which currently does have that. And a USE_CORDIC? |
Is that branch ok to use ? |
@runger1101001 if you can find the time. Plz compose a draft of how to integrate the 8pwm driver. There are some of the code that would work e.g. the setpwm function: // Set voltage to the pwm pin for 8PWM control // limit the voltage in driver // hardware specific writing if( Ubeta > 0 ) { // write to hardware |
Just a brief; Current 4PWM implementation can more or less be copied over to 8PWM, since setting duty-cycle to 4, already setup complimentary PWM outputs, is in a way similar to 4 single pin PWM, just a bit different. |
Will you cross examine?