AM263Px MCU+ SDK  09.01.00
resolver/v0/resolver.h File Reference

Go to the source code of this file.

Data Structures

struct  Track2Constants_t
 struct to hold the track2 constant data More...
 
struct  Diag_Mon_SinCos_Offset_drift_data
 Structure to hold the control/status data for Diagnostics mentioned under Monitor Sin or Cos offset drift (DOS) More...
 
struct  Diag_Mon_SinCos_Gain_drift_data
 Structure to hold the control/status data for Diagnostics mentioned under Monitor Sin or Cos Gain drift (DOS) More...
 
struct  Diag_Mon_Cos_Phase_drift_data
 Structure to hold the control/status data for Diagnostics mentioned under Monitor Cos Phase drift (DOS) More...
 
struct  Diag_Mon_ExcFreq_Degradataion_data
 Structure to hold the control/status data for Diagnostics mentioned under Monitor excitation frequency degradation or loss (DOS) More...
 
struct  Diag_Mon_Rotational_Signal_Integrity_data
 Structure to hold the control/status data for Diagnostics mentioned under Monitor rotational signal integrity (DOS) More...
 
struct  Diag_Mon_Signal_Integrity_SinSq_CosSq
 Structure to hold the control/status data for Diagnostics mentioned under Monitor signal integrity by checking Sin2+Cos2=Constant (DOS) More...
 
struct  Diag_Mon_Sin_Cos_High_Amplitude
 Structure to hold the control/status data for Diagnostics mentioned under Monitor Sin or Cos saturation or very high amplitude (DOS) More...
 
struct  Diag_Mon_Sin_Cos_Weak_Amplitude
 Structure to hold the control/status data for Diagnostics mentioned under Monitor weak Sin or Cos signal below a threshold (LOS) More...
 
struct  ADC_observationalData
 Structure to hold the Observational Data reads int16_t cos_adc - SW Observational ADC data post latch and Averaged if enabled int16_t sin_adc - SW Observational ADC data post latch and Averaged if enabled int16_t cos_rec - SW Observational ADC data post recovered int16_t sin_rec - SW Observational ADC data post recovered int16_t cos_dc - SW Observational ADC data post DC offset Correction int16_t sin_dc - SW Observational ADC data post DC offset Correction int16_t cos_pgc - SW Observational ADC data post Phase Gain Correction int16_t sin_pgc - SW Observational ADC data post Phase Gain Correction. More...
 
struct  Core_config_t
 Struct holds the Resolver Core Configurations Can be passed to RDC_coreParamsInit(Core_config_t* coreParams); Note : this is also called in the RDC_paramsInit(RDC_configParams* params);. More...
 
struct  RDC_configParams
 Struct holds the RDC configurations Can be passed to RDC_paramsInit(RDC_configParams* params); RDC_init(uint32_t base, RDC_configParams* params);. More...
 
struct  baselineParameters
 Struct holds the Baseline Parameter values Can be passed to RDC_BaselineParametersInit(uint32_t base);. More...
 
struct  PeakHistogram_observationalData
 Struct to hold the peakHistogram Buckets for Ideal Sample Calculation by SW. once the auto ideal sample detection has ran for the given train limit, these histograms may be read the bucket with highest value may be selected as the ideal sample bucket. More...
 

Macros

#define RDC_CORE_OFFSET   (CSL_RESOLVER_REGS_IRQSTATUS_RAW_SYS_1 - CSL_RESOLVER_REGS_IRQSTATUS_RAW_SYS_0)
 Header Files. More...
 
#define RDC_EXCITATION_FREQUENCY_MIN_PHASE   (0U)
 Minimum Phase value that can be programmed for the Excitation signal. More...
 
#define RDC_EXCITATION_FREQUENCY_MAX_PHASE   (7999U)
 Maximum Phase value that can be programmed for the Excitation signal. More...
 
#define RDC_MAX_EXCITATION_AMPLITUDE   (249U)
 Maximum Excitation Signal Amplitude. More...
 
#define RDC_RESOLVER_CORE0   (0U)
 Macro used to specify resolver core 0. More...
 
#define RDC_RESOLVER_CORE1   (1U)
 Macro used to specify resolver core 1. More...
 
#define RDC_ADC_CAL_CHANNEL0   (0U)
 
#define RDC_ADC_CAL_CHANNEL1   (1U)
 
#define RDC_ADC_CAL_CHANNEL2   (2U)
 
#define RDC_ADC_CAL_CHANNEL3   (3U)
 
#define RDC_DC_OFFSET_SIN_ESTIMATION   (0U)
 
#define RDC_DC_OFFSET_COS_ESTIMATION   (1U)
 
#define RDC_MIN_IDEAL_SAMPLE_PEAK_AVG_LIMIT   (0U)
 
#define RDC_MAX_IDEAL_SAMPLE_PEAK_AVG_LIMIT   (7U)
 
#define RDC_MAX_IDEAL_SAMPLE_BPF_ADJUST   (0x0000001FU)
 
#define RDC_SINGALMODE_SINGLE_ENDED   (0U)
 
#define RDC_SINGALMODE_DIFFERENTIAL_ENDED   (1U)
 
#define RDC_ADC_BURST_COUNT_DISABLE   (1U)
 Burst Count is disabled. More...
 
#define RDC_ADC_BURST_COUNT_2   (2U)
 2 ADC Samples to be averaged More...
 
#define RDC_ADC_BURST_COUNT_4   (4U)
 4 ADC Samples to be averaged More...
 
#define RDC_ADC_BURST_COUNT_8   (8U)
 8 ADC Samples to be averaged More...
 
#define RDC_ADC_BURST_COUNT_16   (16U)
 16 ADC Samples to be averaged More...
 
#define RDC_ADC_BURST_COUNT_32   (32U)
 32 ADC Samples to be averaged More...
 
#define RDC_SEQUENCER_MODE_0   (0U)
 or returned by RDC_getAdcSequencerOperationalMode() More...
 
#define RDC_SEQUENCER_MODE_1   (1U)
 ADC0 Samples Sin And Cos Sequentially For Core 0
More...
 
#define RDC_SEQUENCER_MODE_2   (2U)
 ADC0 Samples Sin0, Cos0, Cos1, Sin1 Sequentially, To Be Averaged For Core 0. More...
 
#define RDC_SEQUENCER_MODE_3   (3U)
 ADC0 Samples Sin And ADC1 Samples Cos Parallelly For Core 0 Followed By ADC0 Samples Sin And ADC1 Samples Cos Parallelly For Core 1. More...
 
#define RDC_SEQUENCER_MODE_4   (4U)
 ADC0 Samples Sin For Core 0 And ADC1 Samples Sin For Core 1 Parallelly Followed By ADC0 Samples Cos For Core 0 And ADC1 Samples Cos For Core 2. More...
 
#define RDC_SEQUENCER_MODE_5   (5U)
 ADC0/1 Parallelly Sample Sin0, Cos0, Cos1, Sin1 Samples Sequentially For Core0/1. Both Sin(Cos) Samples For Each Core Will Be Averaged. More...
 
#define RDC_EXCITATION_FREQUENCY_5K   (50)
 or returned by RDC_getExcitationSignalFrequencySelect() More...
 
#define RDC_EXCITATION_FREQUENCY_10K   (100)
 select 10KHz Excitation Sine Frequency More...
 
#define RDC_EXCITATION_FREQUENCY_20K   (200)
 select 20KHz Excitation Sine Frequency More...
 
#define OVERSAMPLING_RATIO_16   (8)
 Values that can be returned by RDC_getAdcSampleRate() More...
 
#define OVERSAMPLING_RATIO_20   (10)
 ADC Sample rate selection value oversampling 20 samples to 1. More...
 
#define RDC_INTERRUPT_SOURCE_LOWAMPLITUDE_ERR   (0x00000001U)
 Interrupt Sources Macros. More...
 
#define RDC_INTERRUPT_SOURCE_HIGHAMPLITUDE_COS_FAULT_ERR   (0x00000002U)
 
#define RDC_INTERRUPT_SOURCE_HIGHAMPLITUDE_SIN_FAULT_ERR   (0x00000004U)
 
#define RDC_INTERRUPT_SOURCE_SINSQCOSSQ_LO_ERR   (0x00000008U)
 
#define RDC_INTERRUPT_SOURCE_SINSQCOSSQ_HI_ERR   (0x00000010U)
 
#define RDC_INTERRUPT_SOURCE_COS_MULTI_ZC_ERROR_ERR   (0x00000020U)
 
#define RDC_INTERRUPT_SOURCE_SIN_MULTI_ZC_ERROR_ERR   (0x00000040U)
 
#define RDC_INTERRUPT_SOURCE_COS_NEG_ZC_PEAK_MISMATCH_ERR   (0x00000080U)
 
#define RDC_INTERRUPT_SOURCE_COS_POS_ZC_PEAK_MISMATCH_ERR   (0x00000100U)
 
#define RDC_INTERRUPT_SOURCE_SIN_NEG_ZC_PEAK_MISMATCH_ERR   (0x00000200U)
 
#define RDC_INTERRUPT_SOURCE_SIN_POS_ZC_PEAK_MISMATCH_ERR   (0x00000400U)
 
#define RDC_INTERRUPT_SOURCE_EXCFREQDRIFT_SIN_LO_ERR   (0x00000800U)
 
#define RDC_INTERRUPT_SOURCE_EXCFREQDRIFT_COS_LO_ERR   (0x00001000U)
 
#define RDC_INTERRUPT_SOURCE_EXCFREQDRIFT_HI_ERR   (0x00002000U)
 
#define RDC_INTERRUPT_SOURCE_PHASEDRIFT_COS_LO_ERR   (0x00004000U)
 
#define RDC_INTERRUPT_SOURCE_PHASEDRIFT_COS_HI_ERR   (0x00008000U)
 
#define RDC_INTERRUPT_SOURCE_GAINDRIFT_SIN_LO_ERR   (0x00010000U)
 
#define RDC_INTERRUPT_SOURCE_GAINDRIFT_SIN_HI_ERR   (0x00020000U)
 
#define RDC_INTERRUPT_SOURCE_GAINDRIFT_COS_LO_ERR   (0x00040000U)
 
#define RDC_INTERRUPT_SOURCE_GAINDRIFT_COS_HI_ERR   (0x00080000U)
 
#define RDC_INTERRUPT_SOURCE_OFFSETDRIFT_SIN_LO_ERR   (0x00100000U)
 
#define RDC_INTERRUPT_SOURCE_OFFSETDRIFT_SIN_HI_ERR   (0x00200000U)
 
#define RDC_INTERRUPT_SOURCE_OFFSETDRIFT_COS_LO_ERR   (0x00400000U)
 
#define RDC_INTERRUPT_SOURCE_OFFSETDRIFT_COS_HI_ERR   (0x00800000U)
 
#define RDC_INTERRUPT_SOURCE_TRACK_LOCK_ERR   (0x01000000U)
 
#define RDC_INTERRUPT_SOURCE_ALL
 
#define RDC_CAL_ADC0   (0U)
 Macro used to specify Calibration data for ADC 0. More...
 
#define RDC_CAL_ADC1   (1U)
 Macro used to specify Calibration data for ADC 1. More...
 
#define RDC_IDEAL_SAMPLE_TIME_MODE_0_AUTO_DETECT   (0U)
 This mode runs Ideal Sample Time computation on both Sin and Cos. More...
 
#define RDC_IDEAL_SAMPLE_TIME_MODE_1_AUTO_DETECT_ON_SIN   (1U)
 This mode runs Ideal Sample Time Computation only on Sin. More...
 
#define RDC_IDEAL_SAMPLE_TIME_MODE_2_AUTO_DETECT_ON_COS   (2U)
 This mode runs Ideal Sample Time Computation only on COS. More...
 
#define RDC_IDEAL_SAMPLE_TIME_MODE_3_AUTO_DETECT_OFF   (3U)
 This mode enables Manual override of Ideal Sample Time selection. More...
 

Functions

static void RDC_setAdcSocWidth (uint32_t base, uint8_t socWidth)
 sets the Start of Conversion Width for the ADC conversion More...
 
static void RDC_setAdcBurstCount (uint32_t base, uint8_t burstCount)
 sets the ADC Burst count, samples to be averaged. More...
 
static void RDC_enableAdcSingleEndedMode (uint32_t base)
 Enable Single Ended Mode of operation. More...
 
static void RDC_disableAdcSingleEndedMode (uint32_t base)
 Disable Single Ended Mode of operation. More...
 
static uint32_t RDC_getAdcSequencerOperationalMode (uint32_t base)
 returns Sequencer Operational Mode Valid values are RDC_SEQUENCER_MODE_0 - ADC0 SAMPLES SIN AND ADC1 SAMPLES COSINE PARALLELLY FOR CORE 0 RDC_SEQUENCER_MODE_1 - ADC0 SAMPLES SIN AND COSINE SEQUENTIALLY FOR CORE 0 RDC_SEQUENCER_MODE_2 - ADC0 SAMPLES SIN0, COS0, COS1, SIN1 SEQUENTIALLY, TO BE AVERAGED FOR CORE 0 RDC_SEQUENCER_MODE_3 - ADC0 SAMPLES SIN AND ADC1 SAMPLES COS PARALLELLY FOR CORE 0 FOLLOWED BY ADC0 SAMPLES SIN AND ADC1 SAMPLES COS PARALLELLY FOR CORE 1 RDC_SEQUENCER_MODE_4 - ADC0 SAMPLES SIN FOR CORE 0 AND ADC1 SAMPLES SIN FOR CORE 1 PARALLELLY FOLLOWED BY ADC0 SAMPLES COS FOR CORE 0 AND ADC1 SAMPLES COS FOR CORE 2 RDC_SEQUENCER_MODE_5 - ADC0/1 PARALLELLY SAMPLE SIN0, COS0, COS1, SIN1 SAMPLES SEQUENTIALLY FOR CORE0/1. BOTH SIN(COS) SAMPLES FOR EACH CORE WILL BE AVERAGED. More...
 
static void RDC_setAdcSequencerOperationalMode (uint32_t base, uint8_t operationalMode)
 sets Sequencer Operational Mode Valid values are RDC_SEQUENCER_MODE_0 - ADC0 SAMPLES SIN AND ADC1 SAMPLES COSINE PARALLELLY FOR CORE 0 RDC_SEQUENCER_MODE_1 - ADC0 SAMPLES SIN AND COSINE SEQUENTIALLY FOR CORE 0 RDC_SEQUENCER_MODE_2 - ADC0 SAMPLES SIN0, COS0, COS1, SIN1 SEQUENTIALLY, TO BE AVERAGED FOR CORE 0 RDC_SEQUENCER_MODE_3 - ADC0 SAMPLES SIN AND ADC1 SAMPLES COS PARALLELLY FOR CORE 0 FOLLOWED BY ADC0 SAMPLES SIN AND ADC1 SAMPLES COS PARALLELLY FOR CORE 1 RDC_SEQUENCER_MODE_4 - ADC0 SAMPLES SIN FOR CORE 0 AND ADC1 SAMPLES SIN FOR CORE 1 PARALLELLY FOLLOWED BY ADC0 SAMPLES COS FOR CORE 0 AND ADC1 SAMPLES COS FOR CORE 2 RDC_SEQUENCER_MODE_5 - ADC0/1 PARALLELLY SAMPLE SIN0, COS0, COS1, SIN1 SAMPLES SEQUENTIALLY FOR CORE0/1. BOTH SIN(COS) SAMPLES FOR EACH CORE WILL BE AVERAGED. More...
 
static void RDC_enableResolver (uint32_t base)
 Enables the Resolver Operation. More...
 
static void RDC_disableResolver (uint32_t base)
 Disables the Resolver Operation. More...
 
static void RDC_setExcitationSignalPhase (uint32_t base, uint16_t phase)
 Sets the Phase value for the Excitation Signal. Phase values in the range [RDC_EXCITATION_FREQUENCY_MIN_PHASE, RDC_EXCITATION_FREQUENCY_MAX_PHASE] can be mapped to 0-360 deg. More...
 
static uint32_t RDC_getExcitationSignalPhase (uint32_t base)
 Returns the Phase Value programmed for Excitation signal. More...
 
static void RDC_setExcitationSignalFrequencySelect (uint32_t base, uint8_t FrequencySel)
 Sets the Excitation frequency value from the selected values. More...
 
static uint32_t RDC_getExcitationSignalFrequencySelect (uint32_t base)
 Returns the selected Excitation Signal Frequency select. More...
 
static uint32_t RDC_getAdcSampleRate (uint32_t base)
 Gets the ADC Sampling Ratio. More...
 
static void RDC_enableExcitationSignalSyncIn (uint32_t base)
 Enables the Excitation Signal Sync In. More...
 
static void RDC_disableExcitationSignalSyncIn (uint32_t base)
 Disables the Excitation Signal Sync In. More...
 
static uint32_t RDC_getExcitationSignalEventStatus (uint32_t base)
 returns if there is a sync in event after the RDC_enableResolver() has been called once this returns non-zero, RDC_clearExcitationSignalEventStatus(), RDC_disableResolver(), RDC_enableResolver() needs to be called to rearm. More...
 
static void RDC_clearExcitationSignalEventStatus (uint32_t base)
 Clears SyncIn event status. More...
 
static uint32_t RDC_getExcitationSignalPhaseInfo (uint32_t base)
 Returns the latched value of the last pwm_sync_in rise event of the pwm phase. this is updated on every pwm_sync_in event. More...
 
static void RDC_setExcitationSignalSocDelay (uint32_t base, uint16_t socDelay)
 Sets the SOC Delay from the PWM Exciation Signal. More...
 
static void RDC_setExcitationSignalAmplitudeControl (uint32_t base, uint8_t amplitude)
 set the Amplitude control for the excitation signal More...
 
static uint32_t RDC_getExcitationSignalAmplitudeControl (uint32_t base)
 returns the Amplitude control for the excitation signal More...
 
static void RDC_enableSequencerInterrupt (uint32_t base)
 Enable Sequencer Error Interrupt. More...
 
static void RDC_disableSequencerInterrupt (uint32_t base)
 Disable Sequencer Error Interrupt. More...
 
static void RDC_clearSequencerInterrupt (uint32_t base)
 Clear the Sequencer Error Interrupt status. More...
 
static void RDC_forceSequencerInterrupt (uint32_t base)
 Force the Sequencer Error Interrupt. More...
 
static uint32_t RDC_getSequencerInterruptStatus (uint32_t base)
 Returns Sequencer interrupt Status. More...
 
static void RDC_enableCoreInterrupt (uint32_t base, uint32_t ResolverCore, uint32_t interruptSource)
 enable Core Interrupt More...
 
static uint32_t RDC_getCoreEnabledInterruptSources (uint32_t base, uint8_t ResolverCore)
 returns enabled Interrupt Sources More...
 
static void RDC_disableCoreInterrupt (uint32_t base, uint32_t ResolverCore, uint32_t interruptSource)
 Disable Core Interrupt. More...
 
static void RDC_clearCoreInterrupt (uint32_t base, uint32_t ResolverCore, uint32_t interruptSource)
 Clear the Core Interrupt status. More...
 
static void RDC_forceCoreInterrupt (uint32_t base, uint32_t ResolverCore, uint32_t interruptSource)
 Force the Core Interrupt. More...
 
static uint32_t RDC_getCoreInterruptStatus (uint32_t base, uint32_t ResolverCore)
 Returns Core interrupt Status. More...
 
static bool RDC_getCalibrationStatus (uint32_t base)
 Returns the Calibration Status. More...
 
static void RDC_clearCalibrationStatus (uint32_t base)
 Clears Calibration Status for re-enabling Calibration Sequence. More...
 
static void RDC_selectCalibrationChannel (uint32_t base, uint8_t calChannel)
 Selects Calibration Channel for Cal sequence. More...
 
static void RDC_enableCalibration (uint32_t base)
 Enables ADC Calibration. More...
 
static uint32_t RDC_getCalibrationData (uint32_t base, uint8_t CalAdc)
 Returns the CAL ADC data for given ADC, if the mode permits. More...
 
static void RDC_setDcOffsetCalCoef (uint32_t base, uint8_t core, uint8_t coef1, uint8_t coef2)
 Sets the DC Offset Coefficients coef1, coef2. More...
 
static void RDC_enableBPF (uint32_t base, uint8_t core)
 enables Band Pass Filter before DC Offset logic. More...
 
static void RDC_disableBPF (uint32_t base, uint8_t core)
 Disables Band Pass Filter Logic before DC Offset logic. More...
 
static void RDC_disableDcOffsetAutoCorrection (uint32_t base, uint8_t core)
 Disbales Auto Offset correction from the estimated values Enables DC Offset Manual Correction logic. More...
 
static void RDC_enableDcOffsetAutoCorrection (uint32_t base, uint8_t core)
 Enables Auto DC Offset Correction from the estimated values Disables DC Offset Manual Correction logic and enabled the Auto correction logic. More...
 
static void RDC_setDcOffsetManualCorrectionValue (uint32_t base, uint8_t core, int16_t sin, int16_t cos)
 Sets the Sin, Cosine Manual Correction values for the Dc Offset block in the given resolver core. More...
 
static int16_t RDC_getDcOffsetEstimatedValues (uint32_t base, uint8_t core, uint8_t sinCosValue)
 returns DC OFFSET estimation values More...
 
static void RDC_overrideIdealSampleTime (uint32_t base, uint8_t core, uint8_t overrideValue)
 sets the Override value for the Ideal Sample Time selection. More...
 
static uint8_t RDC_getIdealSampleTime (uint32_t base, uint8_t core)
 Returns the Ideal Sample Time esitimated by the resolver core. More...
 
static void RDC_setIdealSampleDetectionThreshold (uint32_t base, uint8_t core, uint16_t absThresholdValue)
 sets Ideal Sample Detetction Threshold. validates the sample for the Ideal Sample time detection computation More...
 
static void RDC_setIdealSampleBpfAdjust (uint32_t base, uint8_t core, uint8_t sampleAdjustCount)
 the BPF sample adjust when the BPF is turned on. This configuration takes effect only on the auto mode, and doesn't take effect on the manual mode More...
 
static bool RDC_getIdealSamplePeakAvgLimitStatus (uint32_t base, uint8_t core)
 Gets the status if the Peak Averaging Limit is reached. More...
 
static void RDC_setIdealSampleMode (uint32_t base, uint8_t core, uint8_t mode)
 Ideal Sample Time Computation Mode selection. More...
 
static void RDC_enableIdealSampleBottomSampling (uint32_t base, uint8_t core)
 Enables bottom Sampling. twice the sampling rate than disabled. the track2 loop runs twice the speed so, the velocity output needs to be converted to respective rotations per second accordingly. More...
 
static void RDC_disableIdealSampleBottomSampling (uint32_t base, uint8_t core)
 Disables Bottom Sampling. More...
 
static bool RDC_getPhaseGainEstimationStatus (uint32_t base, uint8_t core)
 Gets status if the Phase Gain Estimation is complete. More...
 
static void RDC_setPhaseGainEstimationTrainLimit (uint32_t base, uint8_t core, uint8_t pgEstimationLimit)
 Sets the Phase Gain Estimation train limit. if the programmed value is x, 2^x rotations are considered for the train limit. More...
 
static void RDC_setCosPhaseBypass (uint32_t base, uint8_t core, uint16_t cosPhaseBypass)
 sets the Cos Phase Manual Bypass Value More...
 
static void RDC_enablePhaseGainEstimation (uint32_t base, uint8_t core)
 Enables Phase Gain Estimation in the background. More...
 
static void RDC_disablePhaseGainEstimation (uint32_t base, uint8_t core)
 Disbales Phase Gain Estimation in the background. More...
 
static void RDC_enablePhaseAutoCorrection (uint32_t base, uint8_t core)
 Enables Phase Auto Correction. More...
 
static void RDC_disablePhaseAutoCorrection (uint32_t base, uint8_t core)
 Disables Phase Auto Correction. More...
 
static void RDC_enableGainAutoCorrection (uint32_t base, uint8_t core)
 Enable Gain Auto correction. More...
 
static void RDC_disableGainAutoCorrection (uint32_t base, uint8_t core)
 Disable Gain Auto Correction. More...
 
static void RDC_setGainBypassValue (uint32_t base, uint8_t core, int16_t sinGainBypass, int16_t cosGainBypass)
 Sets the Manual Gain Correction values for Sin and Cos. More...
 
static int16_t RDC_getPhaseEstimation (uint32_t base, uint8_t core)
 returns the Cos Phase Offset Estimation this can be used only if the RDC_getPhaseGainEstimationStatus() returns true More...
 
static void RDC_getGainEstimation (uint32_t base, uint8_t core, int16_t *sinGainEstimate, int16_t *cosGainEstimate)
 returns the Gain estimates for sin and cosine gain values More...
 
static void RDC_setTrack2Constants (uint32_t base, uint8_t core, Track2Constants_t *track2Constants)
 sets up the Track2 loop constants the following are the constants that can be setup using this API More...
 
static void RDC_enableTrack2Boost (uint32_t base, uint8_t core)
 enables the track2 Boost More...
 
static void RDC_disableTrack2Boost (uint32_t base, uint8_t core)
 disables the track2 Boost More...
 
static int16_t RDC_getArcTanAngle (uint32_t base, uint8_t core)
 Returns signed 16bit angle data from ArcTan. the data corresponds to -180 to +180 degrees angle in degrees : ((16b signed int)) * 360 / 2^16. More...
 
static int16_t RDC_getTrack2Angle (uint32_t base, uint8_t core)
 Returns Signed 16 bit angle data from Track2 Loop. the data corresponds to -180 to 180 degrees angle in degrees : ((16b signed int)) * 360 / 2^16. More...
 
static int32_t RDC_getTrack2Velocity (uint32_t base, uint8_t core)
 Returns Signed 32 bit Velocity data from Track2 Loop. More...
 
static void RDC_getDiagnosticsSinCosOffsetDriftData (uint32_t base, uint8_t resolverCore, Diag_Mon_SinCos_Offset_drift_data *monitorData)
 Returns the Monitor Sin or Cos Offset Drift (DOS) diagnostics data int16_t offset_drift_threshold_hi - the configured offset drift threshold hi value int16_t offset_drift_threshold_lo - the configured offset drift threshold lo value bool offset_drift_cos_hi - the status of the flag in the Interrupt status bool offset_drift_cos_lo - the status of the flag in the Interrupt status bool offset_drift_sin_hi - the status of the flag in the Interrupt status bool offset_drift_sin_lo - the status of the flag in the Interrupt status bool offset_drift_en - if the interrupt is enabled for any of the error status. More...
 
static void RDC_setDiagnosticsSinCosOffsetDriftData (uint32_t base, uint8_t resolverCore, Diag_Mon_SinCos_Offset_drift_data *monitorData)
 Sets the Monitor Sin or Cos Offset Drift (DOS) diagnostics controls int16_t offset_drift_threshold_hi - the offset drift threshold hi value to be configured int16_t offset_drift_threshold_lo - the offset drift threshold lo value to be configured bool offset_drift_cos_hi - enables interrupt on this flag if set and offset_drift_en is set bool offset_drift_cos_lo - enables interrupt on this flag if set and offset_drift_en is set bool offset_drift_sin_hi - enables interrupt on this flag if set and offset_drift_en is set bool offset_drift_sin_lo - enables interrupt on this flag if set and offset_drift_en is set bool offset_drift_en - enables interrupt on the errors. More...
 
static void RDC_getDiagnosticsSinCosGainDriftData (uint32_t base, uint8_t resolverCore, Diag_Mon_SinCos_Gain_drift_data *monitorData)
 Returns the Monitor Sin or Cos Gain drift (DOS) diagnostics data int16_t gain_drift_threshold_hi - the configured gain drift threshold hi value int16_t gain_drift_threshold_lo - the configured gain drift threshold lo value uint8_t gain_drift_glitch_count - the configured gain drift glitch count value bool gain_drift_cos_hi - the status of the flag in the Interrupt status bool gain_drift_cos_lo - the status of the flag in the Interrupt status bool gain_drift_sin_hi - the status of the flag in the Interrupt status bool gain_drift_sin_lo - the status of the flag in the Interrupt status bool gain_drift_en - if the interrupt is enabled for any of the error status. More...
 
static void RDC_setDiagnosticsSinCosGainDriftData (uint32_t base, uint8_t resolverCore, Diag_Mon_SinCos_Gain_drift_data *monitorData)
 Sets the Monitor Sin or Cos Gain drift (DOS) diagnostics Controls int16_t gain_drift_threshold_hi - the gain drift threshold hi value to be configured int16_t gain_drift_threshold_lo - the gain drift threshold lo value to be configured uint8_t gain_drift_glitch_count - the gain drift glitch count value to be configured bool gain_drift_cos_hi - enables interrupt on this flag if set and gain_drift_en is set bool gain_drift_cos_lo - enables interrupt on this flag if set and gain_drift_en is set bool gain_drift_sin_hi - enables interrupt on this flag if set and gain_drift_en is set bool gain_drift_sin_lo - enables interrupt on this flag if set and gain_drift_en is set bool gain_drift_en - enables interrupt on the errors. More...
 
static void RDC_getDiagnosticsCosPhaseDriftData (uint32_t base, uint8_t resolverCore, Diag_Mon_Cos_Phase_drift_data *monitorData)
 Returns the Monitor Cos Phase drift (DOS) diagnostics data int16_t phase_drift_threshold_hi - the configured phase drift threshold hi value int16_t phase_drift_threshold_lo - the configured phase drift threshold lo value uint8_t phase_drift_glitch_count - the configured phase drift glitch count value bool phase_drift_cos_hi - the status of the flag in the Interrupt status bool phase_drift_cos_lo - the status of the flag in the Interrupt status bool phase_drift_en - if the interrupt is enabled for any of the error status. More...
 
static void RDC_setDiagnosticsCosPhaseDriftData (uint32_t base, uint8_t resolverCore, Diag_Mon_Cos_Phase_drift_data *monitorData)
 Sets the Monitor Cos Phase drift (DOS) diagnostics Controls int16_t phase_drift_threshold_hi - the phase drift threshold hi value to be configured int16_t phase_drift_threshold_lo - the phase drift threshold lo value to be configured uint8_t phase_drift_glitch_count - the phase drift glitch count value to be configured bool phase_drift_cos_hi - enables interrupt on this flag if set and phase_drift_en is set bool phase_drift_cos_lo - enables interrupt on this flag if set and phase_drift_en is set bool phase_drift_en - enables interrupt on the errors. More...
 
static void RDC_getDiagnosticsExcFreqDegradationData (uint32_t base, uint8_t resolverCore, Diag_Mon_ExcFreq_Degradataion_data *monitorData)
 Returns the Monitor excitation frequency degradation or loss (DOS) diagnostics data uint16_t excfreqdetected_sin - the counts detected between ZCS for sin excitation frequency uint16_t excfreqdetected_cos - the counts detected between ZCS for cos excitation frequency uint16_t excfreqdrift_threshold_hi - the configured excfreqdrift threshold hi value uint16_t excfreqdrift_threshold_lo - the configured excfreqdrift threshold lo value uint16_t excfreq_level - the configured threshold on ADC to detect sin or cos zero crossings uint8_t excfreqdrift_glitchcount - the configured excfreqdrift glitch count value bool excfreqdrift_hi - the status of the flag in the Interrupt status bool excfreqdrift_cos_lo - the status of the flag in the Interrupt status bool excfreqdrift_sin_lo - the status of the flag in the Interrupt status bool excfreqdrift_en - if the interrupt is enabled for any of the error status. More...
 
static void RDC_setDiagnosticsExcFreqDegradationData (uint32_t base, uint8_t resolverCore, Diag_Mon_ExcFreq_Degradataion_data *monitorData)
 Sets the Monitor excitation frequency degradation or loss (DOS) diagnostics Controls uint16_t excfreqdetected_sin - no action uint16_t excfreqdetected_cos - no action uint16_t excfreqdrift_threshold_hi - the excfreqdrift threshold hi value to be configured uint16_t excfreqdrift_threshold_lo - the excfreqdrift threshold lo value to be configured uint16_t excfreq_level - the threshold on ADC to detect sin or cos zero crossings to be configured uint8_t excfreqdrift_glitchcount - the excfreqdrift glitch count value to be configured bool excfreqdrift_hi - enables interrupt on this flag if set and excfreqdrift_en is set bool excfreqdrift_cos_lo - enables interrupt on this flag if set and excfreqdrift_en is set bool excfreqdrift_sin_lo - enables interrupt on this flag if set and excfreqdrift_en is set bool excfreqdrift_en - enables interrupt on the errors. More...
 
static void RDC_getDiagnosticsRotationalSignalIntegrityData (uint32_t base, uint8_t resolverCore, Diag_Mon_Rotational_Signal_Integrity_data *monitorData)
 Returns the Monitor rotational signal integrity (DOS) diagnostics data bool cos_neg_zc_peak_mismatch_err - the status of the flag in the Interrupt status bool cos_pos_zc_peak_mismatch_err - the status of the flag in the Interrupt status bool sin_neg_zc_peak_mismatch_err - the status of the flag in the Interrupt status bool sin_pos_zc_peak_mismatch_err - the status of the flag in the Interrupt status bool sin_multi_zc_error_err - the status of the flag in the Interrupt status bool cos_multi_zc_error_err - the status of the flag in the Interrupt status uint8_t cos_multi_zc_error_count - status of cos capture number of faulty ZCS uint8_t sin_multi_zc_error_count - status of sin capture number of faulty ZCS uint16_t rotpeak_level - the configured "peak level" of rotational Sin/Cos when other signal is zero crossing uint16_t rotfreq_level - the configured "zero crossing detection level" of rotational sin/cos bool zero_cross_rot_en - if the interrupt is enabled for any of the error status. More...
 
static void RDC_setDiagnosticsRotationalSignalIntegrityData (uint32_t base, uint8_t resolverCore, Diag_Mon_Rotational_Signal_Integrity_data *monitorData)
 Sets the Monitor rotational signal integrity (DOS) diagnostics Controls bool cos_neg_zc_peak_mismatch_err - enables interrupt on this flag if set and zero_cross_rot_en is set bool cos_pos_zc_peak_mismatch_err - enables interrupt on this flag if set and zero_cross_rot_en is set bool sin_neg_zc_peak_mismatch_err - enables interrupt on this flag if set and zero_cross_rot_en is set bool sin_pos_zc_peak_mismatch_err - enables interrupt on this flag if set and zero_cross_rot_en is set bool sin_multi_zc_error_err - enables interrupt on this flag if set and zero_cross_rot_en is set bool cos_multi_zc_error_err - enables interrupt on this flag if set and zero_cross_rot_en is set uint8_t cos_multi_zc_error_count - no action uint8_t sin_multi_zc_error_count - no action uint16_t rotpeak_level - the "peak level" of rotational Sin/Cos when other signal is zero crossing to be configured uint16_t rotfreq_level - the "zero crossing detection level" of rotational sin/cos to be configured bool zero_cross_rot_en - enables interrupt on the errors. More...
 
static void RDC_getDiagnosticsSignalIntegritySquareSumData (uint32_t base, uint32_t resolverCore, Diag_Mon_Signal_Integrity_SinSq_CosSq *monitorData)
 Returns the Monitor signal integrity by checking Sin2+Cos2=Constant (DOS) diagnostics data uint16_t sinsqcossq_threshold_hi - the configured threshold hi for sinsq + cossq uint16_t sinsqcossq_threshold_lo - the configured threshold lo for sinsq + cossq uint8_t sinsqcossq_glitchcount - the configured glitchcount for sinsq + cossq error uint16_t sinsqcossq_cossq - actual cossq value on error trigger either lo of hi, first event uint16_t sinsqcossq_sinsq - actual sinsq value on error trigger either lo of hi, first event bool sinsqcossq_hi - the status of the flag in the Interrupt status bool sinsqcossq_lo - the status of the flag in the Interrupt status. More...
 
static void RDC_setDiagnosticsSignalIntegritySquareSumData (uint32_t base, uint32_t resolverCore, Diag_Mon_Signal_Integrity_SinSq_CosSq *monitorData)
 Sets the Monitor signal integrity by checking Sin2+Cos2=Constant (DOS) diagnostics Controls uint16_t sinsqcossq_threshold_hi - the threshold hi for sinsq + cossq to be configured uint16_t sinsqcossq_threshold_lo - the threshold lo for sinsq + cossq to be configured uint8_t sinsqcossq_glitchcount - the glitchcount for sinsq + cossq error to be configured uint16_t sinsqcossq_cossq - no action uint16_t sinsqcossq_sinsq - no action bool sinsqcossq_hi - enable interrupt on this error if set bool sinsqcossq_lo - enable interrupt on this error if set. More...
 
static void RDC_getDiagnosticsHighAmplitudeData (uint32_t base, uint8_t resolverCore, Diag_Mon_Sin_Cos_High_Amplitude *monitorData)
 Returns the Monitor Sin or Cos saturation or very high amplitude (DOS) diagnostics data uint16_t highAmplitude_threshold - the configured threshold for highAmplitude error uint8_t highAmplitude_glitchcount - the configured glitch count for highAmplitude error int16_t highAmplitude_sin_value - value of sin channel at the error trigger instant int16_t highAmplitude_cos_value - value of cos channel at the error trigger instant bool highAmplitude_sin_error - status of the error flag in the interrupt register bool highAmplitude_cos_error - status of the error flag in the interrupt register. More...
 
static void RDC_setDiagnosticsHighAmplitudeData (uint32_t base, uint8_t resolverCore, Diag_Mon_Sin_Cos_High_Amplitude *monitorData)
 Sets the Monitor Sin or Cos saturation or very high amplitude (DOS) diagnostics Controls uint16_t highAmplitude_threshold - the threshold for highAmplitude error to be configured uint8_t highAmplitude_glitchcount - the glitch count for highAmplitude error to be configured int16_t highAmplitude_sin_value - no action int16_t highAmplitude_cos_value - no action bool highAmplitude_sin_error - enabled interrupt on this error if set bool highAmplitude_cos_error - enabled interrupt on this error if set. More...
 
static void RDC_getDiagnosticsWeakAmplitudeData (uint32_t base, uint8_t resolverCore, Diag_Mon_Sin_Cos_Weak_Amplitude *monitorData)
 Returns the Monitor weak Sin or Cos signal below a threshold (LOS) diagnostics data uint16_t lowAmplitude_threshold - the configured threshold for the lowAmplitude error uint8_t lowAmplitude_glitchcount - the configured glitch count for the lowAmplitude error bool lowAmplitude_error - status of the error flag in the interrupt register int16_t lowAmplitude_sin_value - value of sin channel at the trigger instant int16_t lowAmplitude_cos_value - value of cos channel at the trigger instant. More...
 
static void RDC_setDiagnosticsWeakAmplitudeData (uint32_t base, uint8_t resolverCore, Diag_Mon_Sin_Cos_Weak_Amplitude *monitorData)
 Sets the Monitor weak Sin or Cos signal below a threshold (LOS) diagnostics Controls uint16_t lowAmplitude_threshold - the threshold for the lowAmplitude error to be configured uint8_t lowAmplitude_glitchcount - the glitch count for the lowAmplitude error to be configured bool lowAmplitude_error - enabled interrupt on the error if set int16_t lowAmplitude_sin_value - no action int16_t lowAmplitude_cos_value - no action. More...
 
static void RDC_getAdcObservationalData (uint32_t base, uint8_t resolverCore, ADC_observationalData *AdcData)
 Returns the Observational ADC data to struct type ADC_observationalData int16_t cos_adc - SW Observational ADC data post latch and Averaged if enabled int16_t sin_adc - SW Observational ADC data post latch and Averaged if enabled int16_t cos_rec - SW Observational ADC data post recovered int16_t sin_rec - SW Observational ADC data post recovered int16_t cos_dc - SW Observational ADC data post DC offset Correction int16_t sin_dc - SW Observational ADC data post DC offset Correction int16_t cos_pgc - SW Observational ADC data post Phase Gain Correction int16_t sin_pgc - SW Observational ADC data post Phase Gain Correction. More...
 
static void RDC_getPeakHistogramObservationalData (uint32_t base, uint8_t resolverCore, PeakHistogram_observationalData *histogram)
 Returns the Peak Histogram Bucket data. More...
 
void RDC_coreParamsInit (Core_config_t *coreParams)
 Inits the Core Parameters for the resolver core. More...
 
void RDC_paramsInit (RDC_configParams *params)
 Inits the resolver Configuration parameters. More...
 
void RDC_init (uint32_t base, RDC_configParams *params)
 Configures the RDC based on the parameter values. More...
 
void RDC_BaselineParametersInit (uint32_t base)
 Inits Baseline Parameter configurations. More...