4 w non-isolated, wide input-voltage range smps demonstration board based on the viper16 (14 pages)
Summary of Contents for ST UM2313
Page 1
UM2313 User manual Getting started with the STSW-GLA001V1 software package for the STEVAL-GLA001V1 evaluation board based on STM32Cube Introduction The STSW-GLA001V1 firmware is designed to be used with the STEVAL-GLA001V1 insulated AC switch control evaluation board to evaluate its embedded TRIACs and AC switches, implementing different control modes.
Contents UM2313 Contents STSW-GLA001V1 firmware structure ..........5 Overview ................... 5 Architecture ..................5 Parameters..................6 Variables ................... 6 Parameters and variables stored in the MCU Flash memory .... 6 System setup guide ................. 9 Hardware configuration and board setup .......... 9 2.1.1...
Page 3
UM2313 List of tables List of tables Table 1: Stored parameters and variables....................7 Table 2: Factory values for td_buffer ......................8 Table 3: State machine fault codes ......................15 Table 4: STEVAL-GLA001V1 operating modes: analog input and digital level........16 Table 5: STEVAL–GLA001V1 evaluation board: user interface command list ........
Page 4
IHM09M1 expansion board ......................... 9 Figure 3: NUCLEO device on Windows OS ..................... 10 Figure 4: ST-LINK utility tool window after bin file opening ..............11 Figure 5: ST-LINK utility tool Target menu and Program command ............11 Figure 6: ST-LINK utility tool download window ..................12 Figure 7: STSW-GLA001V1 firmware –...
UM2313 STSW-GLA001V1 firmware structure STSW-GLA001V1 firmware structure Overview The STSW-GLA001V1 firmware features: Based on the STM32Cube embedded software libraries Support for the NUCLEO-F030R8 board Configuration and independent control of three TRIACs and AC switches embedded in the STEVAL-GLA001V1 evaluation board: ...
STSW-GLA001V1 firmware structure UM2313 The STSW-GLA001V1 firmware consists of a list of functions that allow the user to interface with the code variables and functions which manage and implement the different evaluation board operating modes AC_Switch_Control_Lib_Interface_Methods.c file: contains the interfacing functions used by the firmware ...
UM2313 STSW-GLA001V1 firmware structure During this process, do not switch the system off to avoid data loss. The data is changed in a state different from GATE_CONTROL_AVAILABLE_IDLE: in this case, the store request is activated and the storage process is only performed, when the state is GATE_CONTROL_AVAILABLE_IDLE.
STSW-GLA001V1 firmware structure UM2313 Description Name Unit Range Factory value (td_min+1) to MainsPeriod/2- μs Maximum td delay td_max MainsPeriod/2- ZCS_margin ZCS_margin Refer to Table 2: μs "Factory values for Turn-on delay buffer td_buffer[N_td] td_min to td_max td_buffer" Table 2: Factory values for td_buffer …...
STEVAL-GLA001V1 evaluation board. The two boards are connected through the X-NUCLEO-IHM09M1 expansion board, which acts as an adapter between a standard ST morpho connector and a 34-pin connector usually mounted on ST evaluation boards. The user has to ensure that SB16 and the SB50 jumpers on the NUCLEO-F030R8 board are closed.
Plug the NUCLEO-F030R8 board USB connector (CN1) to the PC via a USB type A to mini-B cable. If the ST-LINK drivers are correctly installed, the PC recognizes it as an external memory device called NUCLEO or similar. Download the firmware binary file for the NUCLEO-F030R8 board from www.st.com.
UM2313 System setup guide The following window appears. Figure 4: ST-LINK utility tool window after bin file opening Click on the Program command in the Target menu to download the code in the STM32 MCU as shown below. Figure 5: ST-LINK utility tool Target menu and Program command...
System setup guide UM2313 Click on the Start button in the window below and wait until the flashing is complete. Figure 6: ST-LINK utility tool download window Close the STM32 ST-LINK utility tool. 2.1.2 Programming the NUCLEO-F030R8 board using a preconfigured source project The STSW-GLA001V1 firmware is based on STM32Cube and is provided for the IAR™...
UM2313 System setup guide AC_SWITCH_CONTROL: if the user does not want to use the serial communication feature. Figure 8: STSW-GLA001V1 firmware – IAR workspace configuration selection Compile the active project using the Make command from the Project menu or pressing F7 on the PC keyboard or clicking on the highlighted icon shown in the following figure.
System setup guide UM2313 Figure 11: STSW-GLA001V1 state machine The different states are: SYSTEM_INIT: initializes all the firmware variables and parameters used as default values, at board power on or after MCU hardware reset. SYSTEM_SWITCH_ON: checks if the ZVS detection circuit is available and/or used and sets the next state as MAINS_PERIOD_DETECTION if the ZVS signal is available or as CONTROL_MODE_DETECTION if the ZVS signal is not available.
UM2313 System setup guide If the ZVS signal input is not present when zvs_hw = ENABLE, the MainsPeriod detection algorithm restart as soon as the ZVS signal is available. CONTROL_MODE_DETECTION: checks the value of the analog selector called MODE and then sets the GATE_CONTROL_AVAILABLE_IDLE as next state and the related detected operating mode.
System setup guide UM2313 2.2.1 STSW-GLA001V1 control mode detection In the AC_Switch_Control_Tasks.c file, the MediumFrequencyTasks() function calls the AC_Switch_Ctrl_MODE_Selector_Reading() method, if the actual state is not SYSTEM_INIT, SYSTEM_SWITCH_ON, MAINS_PERIOD_DETECTION and FAULT_ERROR. The AC_Switch_Ctrl_MODE_Selector_Reading() method detects if the MODE selector has been moved from the previous position and so if the actual MODE selector value is changed.
UM2313 System setup guide Figure 12: ZVS delay principle Real Ideal mains Real td_zvs The TRIAC control synchronization with ZVS has to be accurate in some applications; so, this delay has to be compensated. For this purpose, the TIM6 is used. As mentioned, the td_zvs delay can be positive or negative: in the first case the pulse gate command must be anticipated and in the second case it must be delayed.
System setup guide UM2313 td_zvs = 0 Equation 5 ZVS_IRQ event 6_ = /2 ∙ _6 2.2.3 ON/OFF pulse basic/timer control mode 2.2.3.1 td_zvs = 0 The figure below shows the timing diagram of the ON/OFF control in basic/timer mode related to the generic TRIAC Tx with pulse command.
UM2313 System setup guide crossing of the V signal. The TIM6 is used to count the MainsPeriod/2 to generate the mains gate pulse command at the falling edge zero crossing. The gate command signal stops in the TIM1 Update ISR (TIM1_UP ISR). The TIM1_ARR (auto reload register) is calculated with the t value.
System setup guide UM2313 The following figure shows the timing diagram for the generic TRIAC (Tx) gate command generation in case of a negative delay in the ZVS signal. Figure 15: ON/OFF control in basic/timer mode with pulse gate command timing diagram with td_zvs <...
UM2313 System setup guide Figure 16: ON/OFF basic mode control with DC gate command timing diagram Push-Button PBTlow PBTlow signal mains Gate command G TIM1_PWM_CHx Start TIM1 Stop TIM1 generated by µC Figure 17: ON/OFF timer mode control with DC gate command timing diagram...
UM2313 System setup guide The CCRx value of TIM1 (TIM1_CCRx) is calculated with t , as follows: Equation 9 1_ = ∙ _1 The TIM1_PWM_Chx is activated (1 logic level) when the TIM1 counting (TIM1_CNT) value is greater than the CCRx value and deactivated (0 logic level) when it is lower than the CCRx value.
Neutral, ensuring to connect the high voltage probe positive terminal to Neutral and the negative one to the Line. The user can alternatively use the STEVAL-GLA001V1 test point, as better described in the related documentation on www.st.com. 24/33 DocID031215 Rev 1...
UM2313 System setup guide The PC4 GPIO signal output is switched on/off in the void EXTI4_15_IRQHandler(void) interrupt function to capture the time the function is called. The following figure shows the oscilloscope capture with the delay measure considering the ZVS signal zero crossing interrupt event falling edge (ZVS signal is inverted with respect to the V signal).
System setup guide UM2313 Figure 22: HyperTerminal: new connection window In the new window, select the virtual COM port in the Connect using field and click OK. Set the Port Settings on the basis of the USART2 peripheral configured by the CubeMX program.
UM2313 System setup guide Select the Settings window and choose VT100 in the Emulation field, then click Open the project Properties from the File menu and select Terminal Setup. Check the 132 column mode option and click OK to close the window.
System setup guide UM2313 Figure 25: Tera Term: setup menu Set the parameters using the values shown below and click OK. Figure 26: Tera Term: setup menu parameters The serial terminal is now configured. For further details about the use of this program, refer to the program Help menu.
UM2313 System setup guide Click on the Nucleo board reset button or reset the MCU via software or hardware. The following window appears. Figure 27: Tera Term: command list To change the window background and/or text color, select the Window menu from the Setup menu.
System setup guide UM2313 Some parameters cannot be modified via the push buttons, but can be modified by inserting the valid values listed below. Table 5: STEVAL–GLA001V1 evaluation board: user interface command list Command Description Sets the tp pulse value [μs] set(tp) Sets the variation step associated to tp +/- push buttons [μs]...
Page 31
UM2313 System setup guide Command Description stop(tx) where tx can be: This command can be independently applied to three Triacs to stop the triac control. Stores a set of data in a dedicated section of the Flash memory of the store(data) microcontroller.
Revision history UM2313 Revision history Table 6: Document revision history Date Version Changes 23-Nov-2017 Initial release. 32/33 DocID031215 Rev 1...
Page 33
ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Need help?
Do you have a question about the UM2313 and is the answer not in the manual?
Questions and answers