S32K322 LCU/Emios I would like to understand the encoder implementation and principle differences between the S32K144 and S32K322. With the S32K144, the initial angle is communicated through the PWM and then provided to the count to the ABI interface for further processing. We also have a fault-detection mechanism to detect A, B, and I signal/wire disconnections using the quadrature decoder functionality through FTM. However, with the S32K322, the same logic is not working as expected, particularly because we are currently unable to detect the direction correctly. For example, when the I-pulse wire is disconnected, the absolute count becomes zero. This results in incorrect switching, after which the absolute count gradually varies and eventually reaches 4095 pulses. In the S32K144, even when the I-pulse is disconnected, the A and B signals with a single output are still able to provide the proper count, allowing us to detect the fault. Could you please provide examples or clarify the expected behavior for the following cases? A-pulse wire disconnected B-pulse wire disconnected I-pulse wire disconnected A and B pulse wires disconnected A, B, and I pulse wires disconnected It would also be helpful if you could explain how the encoder count and direction are expected to behave in each of these scenarios for both the S32K144 and S32K322. Regards, Thiru S32K3 S32K1 BRUSHLESS-DC-MOTOR-CONTROL Re: S32K322 LCU/Emios Hi,
The S32K322 does not include the FTM peripheral that is present on the S32K144. On the S32K3 family, the quadrature encoder functionality is built around the cooperation of the LCU, TRGMUX, and eMIOS modules. This is a fundamentally different architecture from the FTM-based quadrature decoder available on S32K144.
On S32K322, PHA and PHB are decoded by the LCU into separate CW and CCW pulse streams, which are counted by two eMIOS channels. The application obtains the incremental position from the difference between these counters.
A useful starting point for the S32K3 quadrature decoder design is Application Note AN13767, specifically Section 4.2.5, which describes the LUT truth table used for direction detection, TRGMUX routing, and eMIOS edge-counter configuration. Additional information can be found on the S32K344 motor-control kit page and in the related community discussion:
AN13767: Application Note AN13767
S32K344 Motor Control Kit: S32K344 BLDC/PMSM Development Kit
Community discussion: Quadrature decoder on S32K344
Based on the LCU LUT implementation, if either the A or B signal is disconnected, the remaining channel can still generate transitions that produce CW or CCW pulses at the LCU output. As a result, the corresponding eMIOS counter continues counting and direction information may still be available. However, the pulse rate is reduced, resulting in approximately four times fewer counts per revolution compared to normal operation.
If both A and B signals are disconnected, no valid quadrature transitions are present at the LCU inputs. Consequently, neither CW nor CCW pulses are generated and the eMIOS counters remain unchanged.
Regarding the index (I) signal, the NXP motor-control kit implementation does not use the index signal. Position and direction are derived solely from the A and B quadrature signals, while the position offset is calibrated during rotor alignment. Furthermore, the index signal is not connected to the MCU in this implementation. Therefore, the behavior observed when disconnecting the I signal appears to be application-specific.
BR, Petr
Re: S32K322 LCU/Emios I could not fully understand the LCU LUT logic described in the application note. I have the following questions: 1. Detection of A/B signal disconnection: I understand that detecting A or B signal disconnection based only on the absolute count may not be reliable, since the absolute count can remain at 0 or 4095 when either the A or B signal is disconnected. At the same time, defining a fixed threshold based on the CW/CCW counter also seems difficult because the rotor can rotate forward and backward, causing the counter to roll over. The CW/CCW counter can therefore exceed 4095 and continue up to 65535 (uint16), depending on the rollover condition. In this scenario, what would be the recommended logic or threshold for detecting A/B signal disconnection? Could you please suggest a suitable diagnostic approach for this scenario, considering the counter rollover condition?
View full article