Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

User Guide

22.Set minimal speed

23.Set maximal speed and observe the speed transient

24.Set minimal speed and observe the speed transient

25.Then, modify the regulator parameters with PC master software as in steps 11. to 14.

26.Change SPEED_MIN_RPM if problems occur at low speed

27.Repeat steps 21. to 25. until regulation is improved

28.Open const_cust_x.h and modify the regulator parameters with the final variable values evaluated with PC master software

29.Build the code (see Software Execution and Build)

Most important software settings are described in previous sections, but for some applications, PWM frequency must be modified. It is described in PWM Frequency and Current Sampling Period Setting.

Once you set the speed control and the motor is running in all start, speed up, and slow down conditions, the software parameters are set for the motor. Remember that all parameters are set in const_cust_x.h. Then, it is possible to program the FLASH memory of the MC68HC908MR32 device.

6.5.7 PWM Frequency and Current Sampling Period Setting

PWM frequency and current sampling period settings are not usually needed. The PWM frequency also affects the current sampling period. Consequently, the current regulation setting should be done, while understanding their mutual dependency. Therefore, the PWM frequency setting is provided in the file const.h, instead of const_cust_x.h.

6.5.7.1 PWM Frequency

For the PWM frequency setting, follow the label

CAN_CHANGE_FPWM_n in const.h file.

The PWM frequency setting is provided by:

 

/* CAN_CHANGE_FPWM_1: */

 

 

#define SET_PER_PWM

32.0

Designer Reference Manual

 

DRM028 — Rev 0

 

 

 

 

 

 

156

User Guide

MOTOROLA

 

For More Information On This Product,

 

Go to: www.freescale.com

Page 156
Image 156
Motorola M68HC08 manual PWM Frequency and Current Sampling Period Setting, For the PWM frequency setting, follow the label