Modified Motor Driver Firmware to include Flash + Thermal
Dependencies: FastPWM3 mbed-dev-STM-lean
Diff: FOC/foc.cpp
- Revision:
- 58:32e8927fe39f
- Parent:
- 55:c4c9fec8539c
- Child:
- 69:ba1c89835a54
diff -r 0795d2add37e -r 32e8927fe39f FOC/foc.cpp --- a/FOC/foc.cpp Thu Nov 07 18:14:51 2019 +0000 +++ b/FOC/foc.cpp Tue Feb 04 14:19:58 2020 +0000 @@ -243,10 +243,7 @@ //controller->v_q = dtc_q*controller->v_bus; abc(controller->theta_elec + 0.0f*DT*controller->dtheta_elec, scale*controller->v_d, scale*controller->v_q, &controller->v_u, &controller->v_v, &controller->v_w); //inverse dq0 transform on voltages controller->current_sector = ((controller->i_a>0)<<2)|((controller->i_b>0)<<1)|(controller->i_c>0); - svm(controller->v_bus, controller->v_u, controller->v_v, controller->v_w, controller->current_sector, &controller->dtc_u, &controller->dtc_v, &controller->dtc_w); //space vector modulation - - - + svm(controller->v_bus, controller->v_u, controller->v_v, controller->v_w, controller->current_sector, &controller->dtc_u, &controller->dtc_v, &controller->dtc_w); //space vector modulation if(PHASE_ORDER){ // Check which phase order to use, TIM1->CCR3 = (PWM_ARR)*(1.0f-controller->dtc_u); // Write duty cycles