AN2841 Freescale Semiconductor / Motorola, AN2841 Datasheet - Page 19

no-image

AN2841

Manufacturer Part Number
AN2841
Description
Using the Hall Decoder (HD) eTPU Function
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
5.1.1
/* initialize the HD function */
err_code = fs_etpu_hd_init_3ph120 (
/* enable the HD function */
fs_etpu_hd_enable_3ph(
/* enable commutations by HD signals */
fs_etpu_hd_set_commut_on(HD0_PHASEA);
fs_etpu_hd_set_commut_on(HD0_PHASEB);
fs_etpu_hd_set_commut_on(HD0_PHASEC);
6
This application note provides the user with a description of the Hall Decoder (HD) eTPU function usage
and examples. The simple C interface routines to the HD eTPU function enable easy implementation of
the HD in applications. The demo application is targeted at the MCF523x family of devices, but it could
be easily reused with any device that has an eTPU.
Freescale Semiconductor
FS_ETPU_HD_DIRECTION_AUTO_ON, /*direction_on_off: direction is calculated */
HD0_PHASEA, /* engine: A; channel: 0 */
HD0_PHASEB, /* engine: A; channel: 1 */
HD0_PHASEC, /* engine: A; channel: 2 */
FS_ETPU_TCR1, /* timer: TCR1 */
FS_ETPU_HD_REV_COUNTING_ON, /*revolution_on_off: revolutions are counted*/
FS_ETPU_HD_DIRECTION_INC, /* direction: initial direction INC */
&phaseA_commut_cmds,
&phaseB_commut_cmds,
&phaseC_commut_cmds); /* phaseC Commutation Table address */
HD0_PHASEA, /* engine: A; channel: 0 */
HD0_PHASEB, /* engine: A; channel: 1 */
HD0_PHASEC, /* engine: A; channel: 2 */
FS_ETPU_PRIORITY_MIDDLE); /* priority: Middle */
Summary and Conclusions
Function Calls
/* phaseA Commutation Table address */
/* phaseB Commutation Table address */
Using the Hall Decoder (HD) eTPU Function, Rev. 0
Summary and Conclusions
19

Related parts for AN2841