UM0877
●
PFC_ROUTINE
–
This routine is called by the IRQ of DMA1_CH_1 that is generated after two
completed ADC conversions (see
–
Calculates mean of Vdc.
–
Performs a soft-start if the PFC status is PFC_STARTING or a software limitation if
an overcurrent or overvoltage incident occurs. After this, the PFC status switches
to PFC_RUNNING.
–
Manages the software limitation against overcurrent.
–
Manages the software limitation against overvoltage.
–
Performs a voltage PI every 400 cycles.
–
Performs a current PI every cycle.
–
Updates the duty cycle of TIM3 CH.4 and CH.3.
–
Calls CHECK_PROTECTIONS.
●
ACTUAL_PFC_FLAG
–
Returns the value of PFC_STATUS_FLAG.
●
DC_BUS_Value
–
Returns the value in volts of the DC bus voltage.
●
Get_Vac
–
Returns the ADC's converted value of Vac.
●
Get_Iac
–
Returns the ADC's converted value of Iac.
●
Get_Vdc_main
–
Returns the ADC's converted value of Vdc.
6.3.2
PFC.h
The "PFC.h" file contains the definitions of constants used to perform the digital PFC as well
as prototypes of functions.
Some of its parameters can be changed.
●
TIM3 frequency
#define TIM3FREQ
●
ADC channel mapping
/* ADC1 and ADC2
************************************************************ */
#define Vdc_main_Channel ADC_Channel_3
#define Vdc_sub_Channel ADC_Channel_14
#define Iac_Channel ADC_Channel_4
#define Vac_Channel ADC_Channel_5
/* ************************************************************* */
●
Conversion ratios (see
/* Conversion Ratios
******************************************************** */
www.BDTIC.com/ST
Figure 30
80000 // in Hz
Section 3.5.2
,
3.5.3
and
Doc ID 16854 Rev 1
Digital PFC firmware
).
3.5.4
)
35/62
Need help?
Do you have a question about the STM32F103ZE and is the answer not in the manual?
Questions and answers