Texas Instruments AC Induction Motor for TMDSHVMTRPFCKIT HVACIMTR HVACIMTR 데이터 시트

제품 코드
HVACIMTR
다운로드
페이지 12
4
controlSUITE
™ 
software
4-level Hardware Abstraction Layer
Level 1 – Registers and Addresses
Baseline assembly or C communication to all hardware 
registers and addresses. Most MCU vendors stop here.
Level 2 – Bit Fields
At the heart of C2000 software is a set of 
memory-mapped bit fields and structures that make 
registers and register bits seem like simple variables.
• Bit fields can be manipulated without masking
• Flexibility to access a register as a whole or by bits
• Auto-complete field names in CCStudio
• View in CCStudio watch window just like variable
s
Level 3 – API Drivers
The peripheral API drivers are a high-level library of 
functions that wrap common tasks into parameter-based
functions.  
• C call-able functions that automatically set register
  bit fields
• Further reduces learning curve for new programmers
• Common tasks and peripheral modes supported
www.ti.com/controlsuite
Device Support  
Source code and examples that enable easy device and peripheral initialization and configuration
 
Level 4 – Framework
Built primarily upon the bit field headers, the framework 
represents a system template and starting point for all 
applications.
• Function-based device initialization, allowing users
  to focus on application code 
• System management via state machines set to run at
  a specific frequency
• Ability to connect to an external GUI via SCI
• Simple switching between RAM and Flash eases early
  development
• Pre-configured GPIO mapping
//Interrupts set up elsewhere
//Set duty cycle
MOVB       @9,#0x0F,UNC
//Set PWM1A on Zero Event
AND        AL,@11,#0xFFFC
ORB        AL,#0x02
MOV        @11,AL
//Clear PWM1A on Up-count 
//CompareA event
AND        AL,@11,#0xFFCF
ORB        AL,#0x10
MOV        @11,AL
interrupt 
void
 IsrAdc( 
void
 )
{
  
// Period of ePWM1 is set in init;
  // Multiply period by desired duty
  // to get CMPA value;
    EPwm1Regs.CMPA.half.CMPA =
     EPwm1Regs.TBPRD * duty;          
}
interrupt 
void
 IsrAdc( 
void
 )
{
/* set a new pwm value */
PWM_setDutyA
(PWM_MODULE_2, duty
 );
Using direct register access
Using bit field headers
Example code provided across all levels
Using API Driver
Software
Hardware
Direct
use of
headers
Hardware abstraction
Registers and Addresses
Bit Fields
API Drivers
Framework