C2000Ware Digital Power SDK  5.03.00.00
RAMPGEN

Introduction

Data Structures

struct  RAMPGEN
 Defines the Ramp Signal Generator (RAMPGEN) structure. More...
 

Functions

static void RAMPGEN_reset (RAMPGEN *v)
 resets RAMPGEN internal storage data and outputs More...
 
static void RAMPGEN_config (RAMPGEN *v, float32_t isrFrequency, float32_t rampFrequency)
 configures RAMPGEN module More...
 
static void RAMPGEN_run (RAMPGEN *v)
 Run RAMPGEN module. More...
 

Typedefs

typedef float float32_t
 
typedef long double float64_t
 

Macros

#define C2000_IEEE754_TYPES
 

Ramp Generator (RAMPGEN) Module

Introduction

The Ramp Generator (RAMPGEN) API provides a set of functions that generates a ramp signal of a desired frequency.

Ramp Generator Model

API Usage

The following is a sequence of steps that can be followed to use the RAMPGEN API library functions in an existing C program. For a set of code examples that illustrates the use of this library, see the examples in the Digial Power SDK.

Before you can using the library you must add the libraries directory path as a searchable directory in the project include options. This can be done by right-clicking on the project in the Project Explorer window, selecting "Properties". In the window that opens, navigate to "Build, C2000 Compiler, Include Options". In the include path
window, click on the green add directory path button on the right and enter the path to the Digital Power SDK libraries directory.

This allows CCS to search the entire directory for library files.

Once that is done you should follow these steps incorporate this library into your project:

  1. Specify the include file(s)
    #include "rampgen.h"

  2. Create and add module structure to project source file
    RAMPGEN rgen1;

  3. Initialize module, FREQ is the desired RAMP frequency and the ISR_FREQUENCY is the frequency at which this module is called during run time.
    RAMPGEN_reset(&rgen1);
    RAMPGEN_config(&rgen1, CONTROL_ISR_FREQUENCY, AC_FREQ);

  4. Using the module
    This module will be called at ISR_FREQUENCY Rate in an interrupt service routine
    RAMPGEN_run(&rgen1);

    Note: The functions are typically called in an interrupt source routine (ISR) which is called at the defined ISR frequency rate.

API Integration Information

There is only one module in this package, the APIs can be referenced at RAMPGEN. The module headers are located at rampgen.h.

Macro Definition Documentation

◆ C2000_IEEE754_TYPES

#define C2000_IEEE754_TYPES

Definition at line 47 of file rampgen.h.

Typedef Documentation

◆ float32_t

typedef float float32_t

Definition at line 52 of file rampgen.h.

◆ float64_t

typedef long double float64_t

Definition at line 53 of file rampgen.h.

Function Documentation

◆ RAMPGEN_reset()

static void RAMPGEN_reset ( RAMPGEN v)
inlinestatic

resets RAMPGEN internal storage data and outputs

Parameters
va pointer to a RAMPGEN structure

Definition at line 75 of file rampgen.h.

◆ RAMPGEN_config()

static void RAMPGEN_config ( RAMPGEN v,
float32_t  isrFrequency,
float32_t  rampFrequency 
)
inlinestatic

configures RAMPGEN module

Parameters
va pointer to a RAMPGEN structure
isrFrequencyFrequency at which the RAMGEN is called in ISR
rampFrequencyFrequency of the RAMP generated by RAMPGEN module

Definition at line 85 of file rampgen.h.

◆ RAMPGEN_run()

static void RAMPGEN_run ( RAMPGEN v)
inlinestatic

Run RAMPGEN module.

Parameters
va pointer to a RAMPGEN structure

Definition at line 96 of file rampgen.h.

rampgen.h
RAMPGEN_run
static void RAMPGEN_run(RAMPGEN *v)
Run RAMPGEN module.
Definition: rampgen.h:96
RAMPGEN_config
static void RAMPGEN_config(RAMPGEN *v, float32_t isrFrequency, float32_t rampFrequency)
configures RAMPGEN module
Definition: rampgen.h:85
RAMPGEN
Defines the Ramp Signal Generator (RAMPGEN) structure.
Definition: rampgen.h:66
RAMPGEN_reset
static void RAMPGEN_reset(RAMPGEN *v)
resets RAMPGEN internal storage data and outputs
Definition: rampgen.h:75