AN2841 Freescale Semiconductor / Motorola, AN2841 Datasheet
AN2841
Related parts for AN2841
AN2841 Summary of contents
Page 1
... Table of Contents 1 Introduction..........................................................1 2 Function Overview...............................................1 3 Function Description............................................2 3.1 Example Configurations ......................................3 3.2 Commutation .......................................................7 3.3 Performance ...................................................... Level API for Function....................................10 4.1 Initialization Function.........................................13 4.2 Change Operation Functions ............................14 4.3 Value Return Function.......................................16 4.4 TPU-Compatible C Level API for Function ........18 5 Example Use of Function ..................................18 5.1 Demo Application ..............................................18 6 Summary and Conclusions ...............................19 AN2841 ...
Page 2
Function Description PWMC PWMC PWMC Sector Direction Revolution_period Sector_period Revolution_counter 3 Function Description The HD function uses one to four eTPU channels configured as inputs. The primary purpose of this function is to decode the signals derived from Hall effect ...
Page 3
Revolution Period - This parameter determines the TCR time of the last revolution. The parameter value is updated each time the sector is changed. The Revolution Period is measured from the last edge of similar type (low-high / high-low), ...
Page 4
Function Description A Hall Sensor Signal Sector Figure 4. Pre-Defined Configurations: One Phase A Hall Sensor Signal B Hall Sensor Signal Sector 0 Figure 5. Pre-Defined Configurations: Two Phases Using the Hall Decoder (HD) eTPU Function, Rev ...
Page 5
A Hall Sensor Signal B Hall Sensor Signal C Hall Sensor Signal Sector 0 Figure 6. Pre-Defined Configurations: Three Phases - by 60 Deg A Hall Sensor Signal B Hall Sensor Signal C Hall Sensor Signal Sector 4 Figure 7. ...
Page 6
Function Description A Hall Sensor Signal B Hall Sensor Signal C Hall Sensor Signal D Hall Sensor Signal Sector Figure 8. Pre-defined Configurations: Four Phases - by 45 Deg Using the Hall Decoder ...
Page 7
A Hall Sensor Signal B Hall Sensor Signal C Hall Sensor Signal D Hall Sensor Signal Sector Figure 9. Pre-Defined Configurations: Four Phases - by 90 and 45 Deg 3.2 Commutation The HD function has optional ...
Page 8
Function Description 7) Commutation command to execute on HL transition, on decremental direction, as first (hl_d_0). 8) Commutation command to execute on HL transition, on decremental direction, as second (hl_d_1). PWMC PWMC PWMC Commutation of PWM Phases HD Commutation Tables ...
Page 9
Using the Hall Decoder (HD) eTPU Function, Rev. 0 Freescale Semiconductor Function Description 9 ...
Page 10
C Level API for Function 3.3 Performance Like all eTPU functions, the HD function performance in an application is to some extent dependent upon the service time (latency) of other active eTPU channels. This is due to the operational nature ...
Page 11
Using the Hall Decoder (HD) eTPU Function, Rev. 0 Freescale Semiconductor C Level API ...
Page 12
C Level API for Function etpu_hd_phase_commut_cmds_t *phaseB_commut_cmds, etpu_hd_phase_commut_cmds_t *phaseC_commut_cmds, etpu_hd_phase_commut_cmds_t *phaseD_commut_cmds) int32_t fs_etpu_hd_init_4ph90and45( uint8_t channel_phaseA, etpu_hd_phase_commut_cmds_t *phaseA_commut_cmds, etpu_hd_phase_commut_cmds_t *phaseB_commut_cmds, etpu_hd_phase_commut_cmds_t *phaseC_commut_cmds, etpu_hd_phase_commut_cmds_t *phaseD_commut_cmds) • Change Operation Functions: int32_t fs_etpu_hd_enable_1ph( uint8_t channel_phaseA, int32_t fs_etpu_hd_enable_2ph( uint8_t channel_phaseA, int32_t fs_etpu_hd_enable_3ph( uint8_t channel_phaseA, int32_t ...
Page 13
Initialization Function 4.1.1 int32_t fs_etpu_hd_init_1ph(...), int32_t fs_etpu_hd_init_2ph(...), int32_t fs_etpu_hd_init_3ph60(...), int32_t fs_etpu_hd_init_3ph120(...), ...
Page 14
C Level API for Function • 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 ...
Page 15
This is the Phase B channel number. This parameter should be assigned a value of 0-31 for ETPU_A, and 64-95 for ETPU_B. • channel_phaseC (uint8_t) - This is the Phase C channel number. This parameter should ...
Page 16
C Level API for Function • direction (uint8_t) - This parameter should be assigned a value of: — ETPU_HD_DIRECTION_INC — ETPU_HD_DIRECTION_DEC 4.2.5 int32_t fs_etpu_hd_reset_revolution_counter( uint8_t channel, int24_t value) This function changes the Revolution Counter value. This function has the following ...
Page 17
This function returns the motion system direction. This function has the following parameter: • channel (uint8_t) - This is the Phase A channel number. This parameter must be assigned the same value as was assigned ...
Page 18
Example Use of Function 4.3.7 uint8_t fs_etpu_hd_get_pin_state( uint8_t channel) This function returns selected HD channel pin state. This function has the following parameter: • channel (uint8_t) - This is the Phase A channel number. This parameter must be assigned the ...
Page 19
Function Calls /* initialize the HD function */ err_code = fs_etpu_hd_init_3ph120 ( HD0_PHASEA, /* engine: A; channel HD0_PHASEB, /* engine: A; channel HD0_PHASEC, /* engine: A; channel FS_ETPU_TCR1, /* timer: TCR1 */ FS_ETPU_HD_REV_COUNTING_ON, ...
Page 20
Summary and Conclusions References: 1. “General C Functions for the eTPU,” AN2864. 2. Enhanced Time Processing Unit Reference Manual, ETPURM. 3. eTPU Graphical Configuration Tool, http://www.freescale.com, eTPU Product Summary Page. 4. “3-Phase BLDC Motor Demo Application With Speed Closed Loop,” ...
Page 21
THIS PAGE INTENTIONALLY LEFT BLANK Using the Hall Decoder (HD) eTPU Function, Rev. 0 Freescale Semiconductor 21 ...
Page 22
THIS PAGE INTENTIONALLY LEFT BLANK Using the Hall Decoder (HD) eTPU Function, Rev Freescale Semiconductor ...
Page 23
THIS PAGE INTENTIONALLY LEFT BLANK Using the Hall Decoder (HD) eTPU Function, Rev. 0 Freescale Semiconductor 23 ...
Page 24
... Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners.© Freescale Semiconductor, Inc. 2004. All rights reserved. AN2841 Rev. 0 11/2004 ...