SPRUJ55D September 2023 – July 2025 AM263P2 , AM263P2-Q1 , AM263P4 , AM263P4-Q1
Calibration must be done in a controlled setting with a simple constant rotation of the external resolver for the logic to tune the errors in the signal. After tuning, software can read the tuned values which were calculated, and use them in the future.
Before operating the Resolver-to-Digital-Converter (RDC), all the registers need to be set correctly.
An externally connected resolver needs an excitation signal to convert rotational information into a Sine and Cosine modulated signal pair, which are then converted to digital angular information through the RDC. This excitation signal is generated by the internal RDC PWM generator which is then filtered and amplified by an external amplifier(outside AM263P). The output of the external amplifier drives the resolver coil. The sine and cosine outputs of the resolver are sampled, converted to digital signals by ADCs, and processed further by RDC.
Step-1 Power-On Diagnostics: Before initiating the PWM signal and activating the RDC, software is recommended to run diagnostic checks on the resolver ADCs:
There are two types of diagnostic tests dedicated to ADC:
Open-Short tests: Resolver Cos and Sin coils can be connected to RDC ADC inputs through only passive components including pull/up and pull/down bias resistors or they can be connected through an amplifier. During power-on these connections can be checked through ADC internal Open Short Detection(OSD). Please refer to Section 7.5.2.16 of ADC Chapter for more details.
Runtime diagnostic tests with 2 channels dedicated for diagnostics. While ADCs are not sampling the resolver inputs, they will sample two inputs to check full functionality of the ADCs for safety purpose.
Step-2 Sequencer: After diagnostic tests, the next step is to select the desired operating mode through sequencer settings in RESOLVER_REGS_GLOBAL_CFG[11:8]. Refer to Section 7.5.3.2.2.1.1 section for details. RDC subsystem can support one or two hardware Resolvers as described.
Step-3 Excitation signal: Next step is to initialize the excitation signal. The resolver sensor will need a sinusoidal excitation signal with a programmable frequency(using RESOLVER_REGS_EXCIT_SAMPLE_CFG1[7:0]) that will be in sync with the ADC sampling. This signal will be a PWM signal from AM263P which is further filtered and amplified externally(outside AM263P). Before RDC processes incoming data, enough time needs to be allocated for the external PWM to analog signal conversion to settle to its operating frequency. A typical excitation signal PWM filter amplifier(ALM2403-Q1) is shown in Filter and Amplifier Circuit figure and its startup time can be referred for typical settling time of a filter amplifier in data sheet of ALM2403-Q1.
Step-4 Oversample Ratio, Bandpass filter and/or Offset Correction: After excitation frequency settles, Sine and Cosine signals from external resolver will be valid, and calibration and decimation process can be started by software. Each period of excitation frequency is over-sampled by a programmable ratio(using RESOLVER_REGS_EXCIT_SAMPLE_CFG1[15:8]). Default over-sample ratio is 20. This oversamplling enables to use a bandpass filter centered around excitation frequency by providing enough bandwidth. Oversampling also enables offset correction to settle faster and more accurately and also to detect the ideal decimation point.
Software needs to decide whether to have bandpass filter to be enabled or disabled (using RESOLVER_REGS_DC_OFF_CFG1_0[8]). Enabling bandpass filter will introduce phase delay, but it will significantly improve noise rejection. This bandpass filter will also reject DC offset. If bandpass filter is enabled, DC offset correction can be disabled. Enabling DC offset correction when bandpass filter is enabled will not degrade or improve signal. Regardless of DC correction being enabled, DC offset estimation always runs and that way DC offset monitoring can monitor faults. Note: Bandpass filter is only designed for oversample ratio-20.
If bandpass filter is disabled, it is recommended to enable DC offset correction. Note that if there is no valid excitation signal, DC offset correction will saturate the input signal to the RDC. This condition is monitored in fault detection modes. At this point DC offset fault detection and excitation signal monitor fault detection modes need to be enabled. Refer to the previous sections to program bandpass filter and offset correction.
If bandpass filter is disabled, and offset correction needs to be enabled, in this case, offset correction needs to be enabled after ideal sample time selection converges. As explained in next step, ideal sample time checks the peaks to decide ideal sampling point. Although any noise will be averaged, offset correction may introduce false peaks, initially reducing the accuracy.
Step-5 Ideal Sample time selection, and decimation: In order to demodulate the rotation signal, resolver needs to sample the input signal during the peak point of the excitation signal. There are multiple considerations for this:
Ideal sample time selection block oversamples the input signal by 20 and decides the ideal sampling point.
Motor PWM currents are sampled by SOC ADCs. It would be a good practice to align sampling of the resolver signals, with the sampling of the corresponding motor PWM currents. This improves the motor control loop by eliminating the latency. A synchronization pulse coming from motor PWM block which should to be used to synchronize RDC-ADC sampling time.
To demodulate the signal, the peak of excitation signal needs to be sampled. Additionally, software can also enable sampling the negative peak of excitation frequency to improve settling. RDC finds the negative peak, and takes care of the sign automatically as explained in Section Section 7.5.3.2.2.1.4.
If DC offset correction is needed, it needs to be enabled after auto-ideal time selection.
Once the ideal sample time selection is done and configured as manual value, the DC offset correction can be enabled. This will prevent the DC offset correction from interfering with the ideal sample selection algorithm.
Step-6 Differential Phase and Gain Mismatch Correction: Ideally sin and cos signals should have a perfect phase delay of 90 degrees, and their amplitudes should match. If there is a common phase delay, this can be handled by the factory calibration by resetting the 0 deg position, and any minor common gain error will cancel out during arctan calculation. Gross common gain errors will be detected by fault detection mechanisms as explained in fault detection section. In real applications, there will be both differential phase and gain mismatch. Phase and Gain Calibration needs to be done after ideal sample time selection has settled. This is done by enabling the estimation, reading the estimated values and replacing them with manual values. The estimated values can be helpful in the diagnostics.
Step-7 Arctan and Track2 outputs: Output of the Phase and Gain correction goes to arctan block. The arctan data feeds to Track-2 loop. Outputs from the Arctan, or the Track-2 can be read directly from the registers.
Please note that there is a hardware limitation on Arctan offset and hardware track2 velocity RESOLVER_REGS_VELOCITY_TRACK2_0[31:0] sampling. Thus a Software track2 can be used in place of hardware track2 . The RESOLVER_ANGLE_SPEED from the SDK implements the Software track2 for velocity sampling.
The next section describes the RDC diagnostics features and the ways of programming the same.