English
Language : 

MCF523X Datasheet, PDF (24/44 Pages) Freescale Semiconductor, Inc – DC Motor with Speed and Current Closed Loops, Driven by eTPU on
Software Design
4.2.4 APP_STATE_RUN
In this state, the PWM signals are enabled and the motor is on. The required motor speed can be set using
the up and down buttons on the M523xEVB or by using FreeMASTER. The latest value is periodically
written to the eTPU.
When the ON/OFF switch is turned off, the application goes through APP_STATE_DISABLE to
APP_STATE_STOP.
4.2.5 APP_STATE_DISABLE
This state is passed through only. The following actions are performed in order to switch the motor drive
off:
• Reset the required speed
• Disable the generation of PWM signals
If PWM phases were successfully disabled, APP_STATE_STOP is entered. Where PWM phases were not
successfully disabled, the application state remains the same.
4.2.6 APP_STATE_MOTOR_FAULT
This state is entered after the over-current fault interrupt service routine. The application waits until the
ON/OFF switch is turned off. This clears the fault and the application enters the APP_STATE_STOP.
4.2.7 APP_STATE_GLOBAL_FAULT
This state is entered after the eTPU global exception interrupt service routine. The application waits until
the ON/OFF switch is turned off. This clears the fault and the application enters the APP_STATE_INIT.
4.3 eTPU Application API
The eTPU application API encapsulates several eTPU function APIs. The eTPU application API includes
CPU methods which enable initialization, control, and monitoring of an eTPU application. The use of
eTPU application API functions eliminates the need to initialize and set each eTPU function separately
and ensures correct cooperation of the eTPU functions. The eTPU application API is device independent
and handles only the eTPU tasks.
In order to shorten the eTPU application names, abbreviated application names are introduced. The
abbreviations include:
• Motor type (DCM = DC motor, BLDCM = brushless DC motor, PMSM = permanent magnet
synchronous motor, ACIM = AC induction motor, SRM = switched reluctance motor, SM =
stepper motor)
• Sensor type (H = Hall sensors, E = shaft encoder, R = resolver, S = sincos, X = sensorless)
• Control type (OL = open loop, PL = position loop, SL = speed loop, CL = current loop, SVC =
speed vector control, TVC = torque vector control)
DC Motor with Speed and Current Closed Loops, Driven by eTPU on MCF523x, Rev. 0
24
Freescale Semiconductor