ZHCU734A January 2017 – March 2020
The software has been configured to adjust the period of the PWM outputs for the modules selected in llc_user_settings.h (for the TIDM-1001 board these are PWMs 1, 2 , 4, and 5). Variable LLC_periodRef_debug_pu is used to correctly update PWM registers inside the ISR function LLC_runISR1(). The PWM period command can be adjusted from the Expressions Window.
On-chip analog comparators (selected in llc_user_settings.h file) and corresponding DAC mechanisms are used to provide overcurrent protection (for the TIDM-1001 board these are CMPSSs 1, 2, 3 and 4). The reference trip levels for the comparators are defined in the llc_settings.h file: LLC_IPRI1_TRIP_AMPS, LLC_IPRI2_TRIP_AMPS, LLC_ISEC_TRIP_AMPS, LLC_VSEC_TRIP_VOLTS. These define statements set the trip configurations for phase 1 primary current, phase 2 primary current, secondary (output) current, and secondary voltage respectively. The values can be adjusted in the powerSUITE GUI.The comparator output is configured to generate a one-shot trip action on the PWM modules, selected in llc_user_settings.h, whenever the sensed current or voltage is greater than the set limit. The flexibility of the trip mechanism on C2000 devices provides the possibility for taking different actions on different trip events. In this project all PWM outputs are driven low immediately on a comparator event to protect the power stage.
The converter is driven at a PWM switching frequency between 200 kHz and 350 kHz according to the LLC_periodSet_pu command. The control ISR is triggered by a spare PWM module at a rate of 50 KHz, but the project supports increasing the control frequency up to 100 KHz.
A task state-machine has been implemented as part of the background code. Tasks are arranged in groups (A1, A2, A3…, B1, B2, B3…, C1, C2, C3…). Each group is executed according to three CPU timers, which are configured with periods of 1 ms, 20 ms, and 50 ms respectively. Within each group (for example, B) each task is run in a round-robin manner. For example, group B executes every 20 ms, and there are three tasks in group B. Therefore, B1, B2, and B3 execute once every 60 ms.