Motorola M68HC08 CANCHANGEPERCURSAMPn in const.h file, PERCST1US = Periodpwmus * Setpercs ∝s

Models: M68HC08

1 168
Download 168 pages 716 b
Page 158
Image 158

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

User Guide

For current sampling period setting follow the label

CAN_CHANGE_PERCURSAMP_n in const.h file.

Current sampling period setting is provided by:

/*

CAN_CHANGE_FPWM_n: */

 

/*

CAN_CHANGE_PERCURSAMP_n: */

#define SET_PER_CS

2.0

Range: <1,->

The final current sampling period [s] is:

Current sampling period = PWM period*SET_PER_CS

(EQ 6-16.)

 

current sampling period = PWM period * SET_PER_CS [s]

PER_CS_T1_US = PERIOD_PWM_US * SET_PER_CS [s]

6.5.7.3 Current Sampling Instant

Time period from a PWM reload event (middle of central aligned PWM) to current sampling (time shift of A/D conversion with PWM) [s]:

/* CAN_CHANGE_PERCURSAMP_n: */ #define PER_PWM_CS_US 5.0

Range: <-PERIOD_PWM_US/2,PERIOD_PWM_US/2>

Usually it is not recommended to change PER_PWM_CS_US, but it can be evaluated when there are problems with back-EMF zero crossing noise.

It is necessary to set SET_PER_CS according to the following equation:

PERIOD---------------------------------------------------_PWM_US-

< PER_PWM_CS_US < PERIOD---------------------------------------------------_PWM_US-

(EQ 6-17.)

2

2

6.5.8 Conclusion Software Parameters Setting and Tuning

If all the points in Tuning for Customer Motor are done, the software should be customized to customer motor.

If the software customizing of your motor was not successful, it is recommended that you read Application Suitability Guide, since the

Designer Reference Manual

 

DRM028 — Rev 0

 

 

 

158

User Guide

MOTOROLA

 

For More Information On This Product,

 

 

Go to: www.freescale.com

 

Page 158
Image 158
Motorola M68HC08 manual CANCHANGEPERCURSAMPn in const.h file, Current sampling period = PWM period * Setpercs ∝s