![]() |
Definition in file etpu_crank.c.
#include "etpu_crank.h"
#include "etpu_util.h"
Go to the source code of this file.
Functions | |
uint32_t | fs_etpu_crank_init (struct crank_instance_t *p_crank_instance, struct crank_config_t *p_crank_config) |
This function initializes eTPU channels to run CRANK function. | |
uint32_t | fs_etpu_crank_config (struct crank_instance_t *p_crank_instance, struct crank_config_t *p_crank_config) |
This function changes the CRANK configuration. | |
uint32_t | fs_etpu_crank_get_states (struct crank_instance_t *p_crank_instance, struct crank_states_t *p_crank_states) |
This function reads state parameter values of the CRANK function. | |
uint32_t | fs_etpu_crank_set_sync (struct crank_instance_t *p_crank_instance, uint24_t tcr2_adjustment) |
This function adjusts the TCR2 angle counter and asks the eTPU to set the global engine position status to FULL_SYNC. | |
uint24_t * | fs_etpu_crank_copy_tooth_period_log (struct crank_instance_t *p_crank_instance, uint24_t *p_tooth_period_log) |
This function copies the CRANK tooth_period_log into another array in RAM. | |
uint32_t | fs_etpu_crank_get_angle_reseting (void) |
This function returns the engine angle as a number of TCR2 ticks in a range 0 to (tcr2_ticks_per_tooth*teeth_per_cycle - 1), corresponding to 0-720 degrees. | |
Variables | |
uint32_t | fs_etpu_data_ram_start |
uint32_t | fs_etpu_data_ram_ext |
|
|
This function copies the CRANK tooth_period_log into another array in RAM.
Definition at line 390 of file etpu_crank.c. References crank_instance_t::cpba_tooth_period_log, and crank_instance_t::teeth_per_cycle. |
|
This function returns the engine angle as a number of TCR2 ticks in a range 0 to (tcr2_ticks_per_tooth*teeth_per_cycle - 1), corresponding to 0-720 degrees.
Definition at line 423 of file etpu_crank.c. References FS_ETPU_OFFSET_ENG_CYCLE_TCR2_START, and FS_ETPU_OFFSET_ENG_CYCLE_TCR2_TICKS. |
|
This function reads state parameter values of the CRANK function.
Definition at line 312 of file etpu_crank.c. References crank_instance_t::cpba, crank_states_t::eng_pos_state, crank_states_t::error, FS_ETPU_CRANK_OFFSET_ERROR, FS_ETPU_CRANK_OFFSET_LAST_TOOTH_PERIOD, FS_ETPU_CRANK_OFFSET_STATE, FS_ETPU_CRANK_OFFSET_TOOTH_COUNTER_CYCLE, FS_ETPU_CRANK_OFFSET_TOOTH_COUNTER_GAP, fs_etpu_data_ram_start, FS_ETPU_OFFSET_ENG_POS_STATE, crank_states_t::last_tooth_period, crank_states_t::state, crank_states_t::tooth_counter_cycle, and crank_states_t::tooth_counter_gap. |
|
This function initializes eTPU channels to run CRANK function.
Definition at line 147 of file etpu_crank.c. References crank_config_t::blank_teeth, crank_config_t::blank_time, crank_instance_t::chan_num, crank_instance_t::cpba, crank_instance_t::cpba_tooth_period_log, crank_config_t::first_tooth_timeout, FS_ETPU_CRANK_ERR_NO_ERROR, FS_ETPU_CRANK_FM1_TOOTH_PERIODS_LOG_ON, FS_ETPU_CRANK_FUNCTION_NUMBER, FS_ETPU_CRANK_HSR_INIT, FS_ETPU_CRANK_NUM_PARMS, FS_ETPU_CRANK_OFFSET_BLANK_TEETH, FS_ETPU_CRANK_OFFSET_BLANK_TIME, FS_ETPU_CRANK_OFFSET_ERROR, FS_ETPU_CRANK_OFFSET_FIRST_TOOTH_TIMEOUT, FS_ETPU_CRANK_OFFSET_GAP_RATIO, FS_ETPU_CRANK_OFFSET_LAST_TOOTH_PERIOD, FS_ETPU_CRANK_OFFSET_LAST_TOOTH_TCR1_TIME, FS_ETPU_CRANK_OFFSET_LINK_1, FS_ETPU_CRANK_OFFSET_LINK_2, FS_ETPU_CRANK_OFFSET_LINK_3, FS_ETPU_CRANK_OFFSET_LINK_4, FS_ETPU_CRANK_OFFSET_LINK_CAM, FS_ETPU_CRANK_OFFSET_MISSCNT_MASK, FS_ETPU_CRANK_OFFSET_STATE, FS_ETPU_CRANK_OFFSET_TCR2_ADJUSTMENT, FS_ETPU_CRANK_OFFSET_TCR2_TICKS_PER_ADD_TOOTH, FS_ETPU_CRANK_OFFSET_TCR2_TICKS_PER_TOOTH, FS_ETPU_CRANK_OFFSET_TEETH_IN_GAP, FS_ETPU_CRANK_OFFSET_TEETH_PER_CYCLE, FS_ETPU_CRANK_OFFSET_TEETH_PER_SYNC, FS_ETPU_CRANK_OFFSET_TEETH_TILL_GAP, FS_ETPU_CRANK_OFFSET_TOOTH_COUNTER_CYCLE, FS_ETPU_CRANK_OFFSET_TOOTH_COUNTER_GAP, FS_ETPU_CRANK_OFFSET_TOOTH_PERIOD_LOG, FS_ETPU_CRANK_OFFSET_WIN_RATIO_ACROSS_GAP, FS_ETPU_CRANK_OFFSET_WIN_RATIO_AFTER_GAP, FS_ETPU_CRANK_OFFSET_WIN_RATIO_AFTER_TIMEOUT, FS_ETPU_CRANK_OFFSET_WIN_RATIO_NORMAL, FS_ETPU_CRANK_SEEK, FS_ETPU_CRANK_TABLE_SELECT, fs_etpu_data_ram_start, FS_ETPU_ENG_POS_SEEK, FS_ETPU_OFFSET_ENG_CYCLE_TCR2_START, FS_ETPU_OFFSET_ENG_CYCLE_TCR2_TICKS, FS_ETPU_OFFSET_ENG_POS_STATE, crank_config_t::gap_ratio, crank_instance_t::link_1, crank_instance_t::link_2, crank_instance_t::link_3, crank_instance_t::link_4, crank_instance_t::link_cam, crank_instance_t::log_tooth_periods, crank_instance_t::polarity, crank_instance_t::priority, crank_instance_t::tcr2_ticks_per_add_tooth, crank_instance_t::tcr2_ticks_per_tooth, crank_instance_t::teeth_in_gap, crank_instance_t::teeth_per_cycle, crank_config_t::teeth_per_sync, crank_instance_t::teeth_till_gap, crank_config_t::win_ratio_across_gap, crank_config_t::win_ratio_after_gap, crank_config_t::win_ratio_after_timeout, and crank_config_t::win_ratio_normal. |
|
This function adjusts the TCR2 angle counter and asks the eTPU to set the global engine position status to FULL_SYNC.
Definition at line 355 of file etpu_crank.c. References crank_instance_t::chan_num, crank_instance_t::cpba, FS_ETPU_CRANK_HSR_SET_SYNC, and FS_ETPU_CRANK_OFFSET_TCR2_ADJUSTMENT. |
|
|
|
Referenced by fs_etpu_crank_get_states(), and fs_etpu_crank_init(). |
Generated by ![]() |
© Freescale Semiconductor Inc. 2004 - 2012. All Rights Reserved. |