Freescale Semiconductor Inc.
    Regional Technical Application Center

 

Main Page | Class List | Directories | File List | File Members | Related Pages

Pwm_Cfg.h File Reference

This file contains all Port Configuration Structures to be used
as Pwm channels. More...

#include "typedefs.h"

Go to the source code of this file.

Defines

#define ON   0x01
#define OFF   0x00
#define Z0_CORE   ON
#define PWM_ERROR_DETECT   ON
#define PORTB_PIN_0   ((uint8_t)16)
#define PORTB_PIN_1   ((uint8_t)17)
#define PORTB_PIN_2   ((uint8_t)18)
#define PORTB_PIN_3   ((uint8_t)19)
#define PORTB_PIN_4   ((uint8_t)20)
#define PORTB_PIN_5   ((uint8_t)21)
#define PORTB_PIN_6   ((uint8_t)22)
#define PORTB_PIN_7   ((uint8_t)23)
#define DUTY_CYCLE_100   (uint32_t) (303)
#define DUTY_CYCLE_150   (uint32_t) (202)
#define PWM_MAX_CHANNELS   sizeof(Pwm_ChannelConfig[0])
#define SET_PERIOD_AT_150HZ   ((uint32_t)0x000000CA)
#define SET_PERIOD_AT_100HZ   ((uint32_t)0x0000012F)
#define DTY_AT_5P_WITH_100HZ   (uint32_t) (((uint32_t)5 *(uint32_t)DUTY_CYCLE_100)/((uint32_t)100))
#define DTY_AT_20P_WITH_100HZ   (uint32_t) (((uint32_t)20*(uint32_t)DUTY_CYCLE_100)/((uint32_t)100))
#define DTY_AT_50P_WITH_100HZ   (uint32_t) (((uint32_t)50*(uint32_t)DUTY_CYCLE_100)/((uint32_t)100))
#define DTY_AT_65P_WITH_100HZ   (uint32_t) (((uint32_t)65*(uint32_t)DUTY_CYCLE_100)/((uint32_t)100))
#define DTY_AT_70P_WITH_100HZ   (uint32_t) (((uint32_t)70*(uint32_t)DUTY_CYCLE_100)/((uint32_t)100))
#define DTY_AT_90P_WITH_100HZ   (uint32_t) (((uint32_t)90*(uint32_t)DUTY_CYCLE_100)/((uint32_t)100))
#define DTY_AT_5P_WITH_150HZ   (uint32_t) (((uint32_t)5*(uint32_t)DUTY_CYCLE_150)/((uint32_t)100))
#define DTY_AT_20P_WITH_150HZ   (uint32_t) (((uint32_t)20*(uint32_t)DUTY_CYCLE_150)/((uint32_t)100))
#define DTY_AT_50P_WITH_150HZ   (uint32_t) (((uint32_t)50*(uint32_t)DUTY_CYCLE_150)/((uint32_t)100))
#define DTY_AT_65P_WITH_150HZ   (uint32_t) (((uint32_t)65*(uint32_t)DUTY_CYCLE_150)/((uint32_t)100))
#define DTY_AT_70P_WITH_150HZ   (uint32_t) (((uint32_t)70*(uint32_t)DUTY_CYCLE_150)/((uint32_t)100))
#define DTY_AT_90P_WITH_150HZ   (uint32_t) (((uint32_t)90*(uint32_t)DUTY_CYCLE_150)/((uint32_t)100))
#define PWM_CHANNEL_0   ((uint8_t)0)
#define PWM_CHANNEL_1   ((uint8_t)1)
#define PWM_CHANNEL_2   ((uint8_t)2)
#define PWM_CHANNEL_3   ((uint8_t)3)
#define PWM_CHANNEL_4   ((uint8_t)4)
#define PWM_CHANNEL_5   ((uint8_t)5)
#define PWM_CHANNEL_6   ((uint8_t)6)
#define PWM_CHANNEL_7   ((uint8_t)7)
#define PWM_HIGH   1
#define PWM_LOW   0

Variables

Pwm_ChannelConfigType Pwm_ChannelConfig []


Detailed Description

This file contains all Port Configuration Structures to be used
as Pwm channels.

Copyright (c) 2008 Freescale Semiconductor Freescale Confidential Proprietary

Author:
Freescale Semiconductor

r01160

Guadalajara Applications Laboratory RTAC Americas

Version:
0.1
Date:
4/14/2008 5:07:09 PM
Warning:
USER MUST CONFIGRE THE NUMBER OF TOTAL PWM CHANNELS TO USED!
History:

Define Documentation

#define DTY_AT_5P_WITH_100HZ   (uint32_t) (((uint32_t)5 *(uint32_t)DUTY_CYCLE_100)/((uint32_t)100))
 

Duty Cycles useful for 100Hz frequency only

#define DTY_AT_5P_WITH_150HZ   (uint32_t) (((uint32_t)5*(uint32_t)DUTY_CYCLE_150)/((uint32_t)100))
 

Duty Cycles useful for 150Hz frequency only

#define ON   0x01
 

Boolean Condition definitions

#define PORTB_PIN_0   ((uint8_t)16)
 

Port Indexes Name Definitions

#define PWM_CHANNEL_0   ((uint8_t)0)
 

Pwm Channel Names. Used as a reference for Duty Cycle & Period functions

#define PWM_ERROR_DETECT   ON
 

This macro enabled the Pwm Error Layer

#define PWM_HIGH   1
 

Pwm Polarity States

#define PWM_MAX_CHANNELS   sizeof(Pwm_ChannelConfig[0])
 

Number of Pwm channels

#define SET_PERIOD_AT_150HZ   ((uint32_t)0x000000CA)
 

Pwm period frequencies

#define Z0_CORE   ON
 

Pit & emios Interrupts shall be handle by Z0 core


Variable Documentation

Pwm_ChannelConfigType Pwm_ChannelConfig[]
 

This structure holds all Pwm configuration parameters for signal generation