|
|
@@ -385,6 +385,17 @@ void pwm_turn_on_low_side(void)
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
+void pwm_update_sample(u32 samp1, u32 samp2, u8 sector) {
|
|
|
+ pwm_update_2smaples(samp1, samp2);
|
|
|
+#ifdef ENABLE_AUX_TIMER
|
|
|
+ if (samp2 < FOC_PWM_Half_Period) {
|
|
|
+ adc_update_ext_trigger(ADC_TRIGGER_PHASE);
|
|
|
+ }else {
|
|
|
+ adc_update_ext_trigger(ADC_TRIGGER_PHASE2);
|
|
|
+ }
|
|
|
+#endif
|
|
|
+ adc_current_sample_config(sector);
|
|
|
+}
|
|
|
|
|
|
__weak void foc_brake_handler(bool brake) {
|
|
|
//dumy function, must implemented in FOC controller
|