AN2841 Freescale Semiconductor / Motorola, AN2841 Datasheet - Page 18

no-image

AN2841

Manufacturer Part Number
AN2841
Description
Using the Hall Decoder (HD) eTPU Function
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Example Use of Function
4.3.7
This function returns selected HD channel pin state. This function has the following parameter:
The HD channel pin state value is returned as an uint8_t.
4.4
The TPU-compatible API provides backward-compatibility from eTPU to TPU. The following functions
allow control of the eTPU HD function using the TPU HALLD API function calls.
5
5.1
The usage of the HD eTPU function is demontrated in the application note "3-Phase BLDC Motor Demo
Application With Speed Closed Loop". For a detailed description of the demo, refer to AN2892.
The HD function is initialized in configuration with three phases and HD sensors by 120 degrees. Direction
and revolution counting is enabled.
18
channel (uint8_t) - This is the Phase A channel number. This parameter must be assigned the
same value as was assigned to the channel_phaseA parameter in the initialization routine. If there
are more HDs running simultaneously on the eTPU(s), the channel parameter distinguishes which
HD function is accessed.
Initialization Function:
Change Operation Functions:
Value Return Functions:
TPU-Compatible C Level API for Function
Example Use of Function
Demo Application
uint8_t fs_etpu_hd_get_pin_state( uint8_t channel)
void tpu_halld_init(struct TPU3_tag *tpu,
void tpu_halld_enable(struct TPU3_tag *tpu,
void tpu_halld_disable(struct TPU3_tag *tpu,
void tpu_halld_set_direction(struct TPU3_tag *tpu,
INT16 tpu_halld_get_state_no(struct TPU3_tag *tpu,
INT16 tpu_halld_get_pinstate(struct TPU3_tag *tpu,
tpu_halld_set_state_no_address(...) function is not implemented!
Using the Hall Decoder (HD) eTPU Function, Rev. 0
UINT8 channel,
INT16 direction,
INT16 state_no_address,
UINT8 mode)
UINT8 channel,
UINT8 priority)
UINT8 channel)
UINT8 channel,
INT16 direction)
UINT8 channel)
UINT8 channel)
NOTE
Freescale Semiconductor

Related parts for AN2841