TIDUEY0A November 2020 – December 2025
Figure 3-3 shows the general structure of the project. Once the project is imported, the Project Explorer appears inside CCS as shown in Figure 3-4.
Figure 3-3 Project Structure
OverviewSolution-specific and
device-independent files that consist of the core algorithmic code are in
.c/h.
Board-specific and device-specific
files are in _hal.c/h. This file consists of device-specific
drivers to run the solution. If the user wants to use a different modulation scheme
or a different device, the user is required only to make changes to these files,
besides changing the device support files in the project.
The -main.c
file consists of the main framework of the project. This file consists of calls to
the board and solution file that help in creating the system framework, along with
the interrupt service routines (ISRs) and slow background tasks.
For this design, the solution is
bt4ch.
The powerSUITE page can be opened by clicking on the main.syscfg file, listed under
the Project Explorer. The page generates the _settings.h
file. This file is the only C language-based file used in the compile of the project
that is generated by the powerSUITE page. The user must not modify this file
manually, because the changes are overwritten by powerSUITE each time the project is
saved. The _settings.h file includes function of the operation mode selection and
the compensation settings for current and voltage control loop.
_user_settings.h is included by the
_settings.h and can be used to keep any settings
that are outside the scope of powerSUITE tools such as #defines for ADC mapping,
GPIOs, and so forth.
The
_cal.h file consists of gain and offset values
for current and voltage measurements.
The
_.ccxml settings up which debugger to use for the
reference design. In this design the connection of XDS110 USB debug probe is used
and the target device is TMS320F28P65DK9.
The Kit.json and solution.js files are used internally by powerSUITE, and must not be modified by the user. Any changes to these files results in the project not functioning properly.
The solution name is also used as the module name for all the variables and defines used in the solution. Hence, all variables and function calls are prepended by the BT4CH header (for example, BT4CH_userParam_chX). This naming convention lets the user combine different solutions while avoiding naming conflicts.
The bt4ch project consists of three ISRs (ISR1, ISR2, and ISR3).
Figure 3-6 shows the time taken by ISR1, ISR2, and ISR3 when all four channels are ON. The total time taken three ISRs is less than 6 μs which is less 30% of CPU usage for 50 kSPS control loop sample rate. Figure 3-5 and Figure 3-7 show ISR time for when only one channel is ON and all channels are OFF.
Figure 3-5 ISR Execution Time for One
Channel
Figure 3-6 ISR Execution Time for Four
Channels
Figure 3-7 ISR Execution Time When All
Channels are OFF