How many Quadrature encoder inputs can an S32K44 and an S32K388 support? I found https://community.nxp.com/t5/S32K/Quadrature-decoder-on-S32K344/m-p/1507580 as well as the application notes on https://www.nxp.com/design/design-center/development-boards-and-designs/MCSPTE1AK344 but I'm struggling to pin down how many quadrature encoders I could instantiate. I have an application where, ideally, I would be able to have 4 independent quadrature decoders. Would either the S32K344 or the S32K388 support that? Re: How many Quadrature encoder inputs can an S32K44 and an S32K388 support? Hello,
The S32K3 family does not include a dedicated quadrature decoder peripheral. Instead, the quadrature decoder functionality is implemented using a combination of the LCU, TRGMUX, and eMIOS modules. This is the approach described in the S32K3 Reference Manual and the motor-control example referenced in the community thread.
According to the Reference Manual, the incremental encoder example requires two Logic Cells (LC0 and LC1) for a single quadrature decoder implementation. The S32K344 and S32K388 devices provide two LCU instances.
However, I have also asked motor control team to provide the feedback.
I will update you ASAP.
Best regards,
Peter Re: How many Quadrature encoder inputs can an S32K44 and an S32K388 support? Hello,
Update:
Based on the implementation described in the NXP example, the practical limit is three independent quadrature decoders on both S32K344 and S32K388. This solution consumes:
6 TRGMUX input pins (3 × A/B encoder inputs), 6 eMIOS channels capable of MCB operation (for example eMIOS0 CH1-CH6), 3 Logic Cells (one LCU instance).
Therefore, three encoder instances can be implemented directly using the demonstrated architecture.
A fourth encoder is not directly supported by the same resource mapping. The main limitation is the availability of suitable eMIOS channels operating in MCB mode together with the required signal routing through TRGMUX and LCU.
A possible workaround may exist by using the remaining G-type channel (e.g. CH7) together with an X-channel and routing the LCU output externally through a device pin back into the eMIOS X input. For example, on S32K344, PTB2 can be configured as both LCU1_OUT3 and eMIOS0_CH8_X, effectively creating an external loopback path. However, this approach consumes an additional package pin and is not part of the standard demonstrated solution.
As a result, 3 quadrature decoders are straightforwardly achievable, while a 4th decoder would require an alternative routing scheme or custom workaround and should be evaluated against the overall pin and peripheral resource usage.
Best regards,
Peter Re: How many Quadrature encoder inputs can an S32K44 and an S32K388 support? For my application, I don't really need the eMIOS-based interpretation which counts using the timer - I really only need to have the encoder counts available. Is there any configuration which would support having 8 TRGMUX inputs and 4 LCU cells leading to something which just counts up and down?
View full article