AN2841 Freescale Semiconductor / Motorola, AN2841 Datasheet - Page 14

no-image

AN2841

Manufacturer Part Number
AN2841
Description
Using the Hall Decoder (HD) eTPU Function
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
C Level API for Function
4.2
4.2.1
These routines are used to start initialized HD function(s). They differ in number of phases they initialize
(1, 2, 3 or 4 phases). The following parameters are used in conjunction with these functions:
14
revolution_on_off (int8_t) - This parameter turns on/off the revolution counting. This parameter
should be assigned a value of:
— FS_ETPU_HD_REV_COUNTING_ON
— FS_ETPU_HD_REV_COUNTING_OFF
direction_on_off (int8_t) - This parameter turns on/off the automatic detection of motion system
direction. This parameter should be assigned a value of:
— FS_ETPU_HD_DIRECTION_AUTO_ON
— FS_ETPU_HD_DIRECTION_AUTO_OFF
direction (int8_t) - This parameter sets the initial motion system direction. This parameter should
be assigned a value of:
— FS_ETPU_HD_DIRECTION_INC
— FS_ETPU_HD_DIRECTION_DEC
PWMM_chan (int8_t) - This is the channel number of the PWMM channel (master channel).
This parameter should be assigned a value of 0-31 for ETPU_A, and 64-95 for ETPU_B.
*phaseA_commut_cmds (etpu_hd_phase_commut_cmds_t) - Pointer to the commutation
table for phase A; etpu_hd_phase_commut_cmds_t structure type is defined in etpu_hd.h
file. It is defined as a structure of eight
*phaseB_commut_cmds (etpu_hd_phase_commut_cmds_t) - Pointer to the commutation table
for phase B; etpu_hd_phase_commut_cmds_t structure type is defined in etpu_hd.h file.
It is defined as a structure of eight
*phaseC_commut_cmds (etpu_hd_phase_commut_cmds_t) - Pointer to the commutation
table for phase C; etpu_hd_phase_commut_cmds_t structure type is defined in etpu_hd.h
file. It is defined as a structure of eight
*phaseD_commut_cmds (etpu_hd_phase_commut_cmds_t) - Pointer to the commutation
table for phase D; etpu_hd_phase_commut_cmds_t structure type is defined in etpu_hd.h
file. It is defined as a structure of eight uint32_t commutation commands.
channel_phaseA (uint8_t) - This is the Phase A channel number. This parameter should be
assigned a value of 0-31 for ETPU_A, and 64-95 for ETPU_B.
Change Operation Functions
int32_t fs_etpu_hd_enable_1ph(...),
int32_t fs_etpu_hd_enable_2ph(...),
int32_t fs_etpu_hd_enable_3ph(...),
int32_t fs_etpu_hd_enable_4ph(...)
Using the Hall Decoder (HD) eTPU Function, Rev. 0
uint32_t
uint32_t
uint32_t
commutation commands.
commutation commands.
commutation commands.
Freescale Semiconductor

Related parts for AN2841