cancel
Showing results for 
Search instead for 
Did you mean: 

PWM phase shift for dual active bridge

Gaia
Associate

I have a dual active bridge and I am supposed to do leading and lagging phase shift to achieve that. This needs to be a precise shift to the lowest degree of 1. I am using an STM32F429. This is the logic I am using:

HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_2);
HAL_TIM_OC_Start(&htim3, TIM_CHANNEL_3);
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_1);
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_2);
lowR = htim3.Instance->CNT;
while (lowR == 13) {
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);
HAL_TIM_OC_Start(&htim1, TIM_CHANNEL_3);
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);
HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);
break; 

 

The ARR for timer 3 is 1800 and I am trying to start timer 1 after 5% of timer 3's period. I cant use master-slave configuration as I cannot reverse it to give me the lagging mode for the converter. Please please help.

0 REPLIES 0