MCPWM/MCPWMSimple/mcpwm_simple.c File Reference

#include "lpc17xx_qei.h"
#include "lpc17xx_mcpwm.h"
#include "lpc17xx_timer.h"
#include "lpc17xx_pinsel.h"
#include "lpc17xx_libcfg.h"
#include "lpc17xx_nvic.h"
#include "lpc17xx_clkpwr.h"
#include "debug_frmwrk.h"

Defines

#define DC_MODE_TEST   0
#define AC_MODE_TEST   0
#define CAPTURE_MODE_TEST   1

Functions

void MCPWM_IRQHandler (void)
 MCPWM interrupt handler sub-routine.
void Timer_Wait (LPC_TIM_TypeDef *Timer, uint32_t time)
 Delay millisecond.
int c_entry (void)
 Main MCPWM program body.
int main (void)
void check_failed (uint8_t *file, uint32_t line)

Variables

const PINSEL_CFG_Type mcpwm_mco0a_pin [1] = {{1, 19, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mco0b_pin [1] = {{1, 22, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mco1a_pin [1] = {{1, 25, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mco1b_pin [1] = {{1, 26, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mco2a_pin [1] = {{1, 28, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mco2b_pin [1] = {{1, 29, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mcfb0_pin [1] = {{1, 20, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mcfb1_pin [1] = {{1, 23, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mcfb2_pin [1] = {{1, 24, 1, 0, 0}}
const PINSEL_CFG_Type mcpwm_mcabort_pin [1] = {{ 1, 21, 1, 0, 0}}
MCPWM_CAPTURE_CFG_Type captureCfg
__IO FlagStatus CapFlag
__IO uint32_t CapVal

Detailed Description

: This simple example used to test MCPWM driver
Version:
: 1.0
Date:
: 27. May. 2009
Author:
: HieuNguyen ---------------------------------------------------------------------------- Software that is described herein is for illustrative purposes only which provides customers with programming information regarding the products. This software is supplied "AS IS" without any warranties. NXP Semiconductors assumes no responsibility or liability for the use of the software, conveys no license or title under any patent, copyright, or mask work right to the product. NXP Semiconductors reserves the right to make changes in the software without notification. NXP Semiconductors also make no representation or warranty that such application will be suitable for the specified use without further testing or modification.

Define Documentation

#define AC_MODE_TEST   0

MCPWM in 3-phase AC motor mode test

#define CAPTURE_MODE_TEST   1

MCPWM tested with Capture function

#define DC_MODE_TEST   0

MCPWM in 3-phase DC motor mode test


Function Documentation

void Timer_Wait ( LPC_TIM_TypeDef *  Timer,
uint32_t  time 
)

Delay millisecond.

Parameters:
[in] Timer Timer peripheral, should be TIM0..3
[in] time delay time value in ms
Returns:
None


Variable Documentation

__IO FlagStatus CapFlag

capture flag

MCPWM_CAPTURE_CFG_Type captureCfg

Capture configuration data

__IO uint32_t CapVal

Latest capture value

const PINSEL_CFG_Type mcpwm_mcabort_pin[1] = {{ 1, 21, 1, 0, 0}}

Motor Control Low-active abort feed back

const PINSEL_CFG_Type mcpwm_mcfb0_pin[1] = {{1, 20, 1, 0, 0}}

Motor Control Feed Back Channel 0 - MCI0

const PINSEL_CFG_Type mcpwm_mcfb1_pin[1] = {{1, 23, 1, 0, 0}}

Motor Control Feed Back Channel 1 - MCI1

const PINSEL_CFG_Type mcpwm_mcfb2_pin[1] = {{1, 24, 1, 0, 0}}

Motor Control Feed Back Channel 2 - MCI2

const PINSEL_CFG_Type mcpwm_mco0a_pin[1] = {{1, 19, 1, 0, 0}}

Motor Control Channel 0 Output A

const PINSEL_CFG_Type mcpwm_mco0b_pin[1] = {{1, 22, 1, 0, 0}}

Motor Control Channel 0 Output B

const PINSEL_CFG_Type mcpwm_mco1a_pin[1] = {{1, 25, 1, 0, 0}}

Motor Control Channel 1 Output A

const PINSEL_CFG_Type mcpwm_mco1b_pin[1] = {{1, 26, 1, 0, 0}}

Motor Control Channel 1 Output B

const PINSEL_CFG_Type mcpwm_mco2a_pin[1] = {{1, 28, 1, 0, 0}}

Motor Control Channel 2 Output A

const PINSEL_CFG_Type mcpwm_mco2b_pin[1] = {{1, 29, 1, 0, 0}}

Motor Control Channel 2 Output B


Generated on Thu Apr 22 11:13:08 2010 for CMSISExampleCode by  doxygen 1.5.8