SPRUJ55D September 2023 – July 2025 AM263P2 , AM263P2-Q1 , AM263P4 , AM263P4-Q1
The Phase and Gain correction block can estimate and correct phase errors during rotation. The Phase and Gain correction will not work if there is no rotation. This diagnostics feature can be used for detecting drift in the phase of Cosine Input to RDC. The Phase and Gain Correction Block contains an Estimation Block and a Correction Block.
The below register will contain the estimated values from the Phase and Gain estimation block, needed to estimate the phase
The diagnostic block would monitor phaseestimatefinal and compare with the Phase Drift thresholds. For selecting a threshold of 3 degrees(an expected value of 3 degrees of mismatch due to board components mismatch and external resolver coils mismatch) program a value of 1716 as shown below for high and low thresholds for Cosine Phase drift
The below Table 7-132 shows the relevant diagnostics registers for both RDC0 and RDC1.
| RDC Instance | Diagnostic Register Name | Physical Address | Offset |
|---|---|---|---|
| RDC0 | DIAG16_0 | 502C B0D4h | 0D4h |
| DIAG17_0 | 502C B0D8h | 0D8h | |
| RDC1 | DIAG16_1 | 502C B2A4h | 2A4h |
| DIAG17_1 | 502C B2A8h | 2A8h |
The below Table 7-133 shows the register bits of IRQ registers to be used for Reading Status, Enabling/Disabling the Error Diagnostic check.
| Diagnostic Register Name | Bit | Field | Type | Reset | Typical Programmed Value | Description |
|---|---|---|---|---|---|---|
| DIAG16_0 DIAG16_1 |
31:16 | phasedrift_threshold_lo | R/W | 0h | - | Phase Drift Low Threshold |
| 15:0 | phasedrift_threshold_hi | R/W | 0h | - | Phase Drift High Threshold | |
| DIAG17_0 DIAG17_1 |
7:0 | phasedrift_glitchcount | R/W | 0h | - | Counter limit for times Phase drift error is detected before issuing and error |
The below Table 7-134 shows the register bits of IRQ registers to be used for Reading Status, Enabling/Disabling the Error Diagnostic check.
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 15 | phasedrift_cos_hi_err | R/W | 0h | Cosine Signal Gain Drift Crossing the High Threshold Error |
| 14 | phasedrift_cos_lo_err | R/W | 0h | Sine Signal Gain Drift Crossing the High Threshold Error |
The below are the typical steps for programming the Cosine Phase Drift check.
Associated AM263Px MCU+ SDK API with this check: Diag_Mon_Cos_Phase_drift_data