SPRUJ55D September 2023 – July 2025 AM263P2 , AM263P2-Q1 , AM263P4 , AM263P4-Q1
This diagnostic check monitors the signal integrity of Sine and Cosine input signals to RDC, by checking that Sin2 + Cos2 = Constant. This check is performed on demodulated incoming Sine and Cosine signals before the Phase and Gain correction. Rotation of the external Resolver is not necessary for this diagnostic check.
Since the values of Sine(sampledsin) and Cosine(sampledcos) can be maximum of ±215, squaring both would result in maximum value of ±230. This diagnostic block divides/shifts both by 16 bits resulting in values max of ±214.
If it is seen that the incoming signals samples are nominally centered around 60% of ADC range, the above limits can be modified accordingly.
If the resulting calculated value from this diagnostic check crosses the above limits(the calculated value is higher than high limit, or lower than low limit), then a fault increments the glitch counter. A fault is issued when the glitch counter reaches the programmed glitch threshold in sinsqcossq_glitchcount.
The below Table 7-141 shows the relevant diagnostics registers for both RDC0 and RDC1.
| RDC Instance | Register Name | Physical Address | Offset |
|---|---|---|---|
| RDC0 | DIAG9_0 | 502C B0B8h | 0B8h |
| DIAG10_0 | 502C B0BCh | 0BCh | |
| DIAG11_0 | 502C B0C0h | 0C0h | |
| RDC1 | DIAG9_1 | 502C B288h | 288h |
| DIAG10_1 | 502C B28Ch | 28Ch | |
| DIAG11_1 | 502C B290h | 290h |
The below Table 7-142 shows the corresponding bits to be programmed in the diagnostics registers.
| Register | Bit | Field | Type | Reset | Typical Programmed Value | Description |
|---|---|---|---|---|---|---|
| DIAG9_0 DIAG9_1 |
31:16 | sinsqcossq_threshold_hi | R/W | 0x0 | 26542 | High Threshold value for triggering Sin2 + Cos2 Signal Integrity error |
| 15:0 | sinsqcossq_threshold_lo | R/W | 0x0 | 16056 | Low Threshold value for triggering Sin2 + Cos2 Signal Integrity error | |
| DIAG10_0 DIAG10_1 |
31:16 | sinsqcossq_cossq | R | x | - | Value of Cos2 when the Sin2 + Cos2 Signal Integrity error was triggered |
| 15:0 | sinsqcossq_sinsq | R | x | - | Value of Sin2 when the Sin2 + Cos2 Signal Integrity error was triggered | |
| DIAG11_0 DIAG11_1 |
7:0 | sinsqcossq_glitchcount | R/W | 0x1 | - | Sin2 + Cos2 Signal Integrity Error counter limit for issuing error |
The below Table 7-143 shows the register bits of IRQ registers to be used for Reading Status, Enabling/Disabling the Error Diagnostic check.
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 4 | sinsqcossq_hi_err | rw1ts | 0x0 | Sin2 + Cos2 value is too high |
| 3 | sinsqcossq_lo_err | rw1ts | 0x0 | Sin2 + Cos2 value is too low |
The below are the typical steps for programming this check.
Associated AM263Px MCU+ SDK API with this check: Diag_Mon_Signal_Integrity_SinSq_CosSq