S32K3 LPCMP roundrobin

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K3 LPCMP roundrobin

跳至解决方案
1,274 次查看
PINKMAN
Contributor III

hi experts:

I have a question regarding the round-robin function of the LPCMP. I have fixed the negative input of the comparator to the DAC, while there are two channels for the positive input. This setup allows me to use the RTC to trigger polling.

My question is: whether it is possible to set different DAC values for the two positive input channels respectively.

For example,

positive input 0 is paired with a 2.5V DAC output,

and positive input 1 is paired with a 3.0V DAC output.

My understanding is that this configuration is not supported, meaning only a single fixed DAC value can be used for the round-robin comparison.

0 项奖励
回复
1 解答
1,250 次查看
PavelL
NXP Employee
NXP Employee

Hello @PINKMAN ,

Your understanding is correct. In the LPCMP round‑robin mode, the one input can be cycled across multiple channels (e.g., IN0, IN1), while the other input is fixed to a single source - the internal DAC. The LPCMP round-robin switch does not control the DAC.

In other words:

  • You can select multiple positive input channels for polling.
  • Only one DAC setting is used as the reference (negative input) for the entire round‑robin sequence.

This aligns with the S32K3 Reference Manual, Rev. 11, Figure 263 (LPCMP block diagram).

Possible alternatives if you need two thresholds (e.g., 2.5 V and 3.0 V):

  1. Use two LPCMP instances (if available in your S32K3 chip), each with its own DAC setting.
  2. Software-controlled DAC update: After each RTC trigger or poll, reprogram the DAC to the next threshold before the subsequent comparison. Naturally, this adds latency and you lose fully autonomous round‑robin behavior.

Best regards,

Pavel

在原帖中查看解决方案

1 回复
1,251 次查看
PavelL
NXP Employee
NXP Employee

Hello @PINKMAN ,

Your understanding is correct. In the LPCMP round‑robin mode, the one input can be cycled across multiple channels (e.g., IN0, IN1), while the other input is fixed to a single source - the internal DAC. The LPCMP round-robin switch does not control the DAC.

In other words:

  • You can select multiple positive input channels for polling.
  • Only one DAC setting is used as the reference (negative input) for the entire round‑robin sequence.

This aligns with the S32K3 Reference Manual, Rev. 11, Figure 263 (LPCMP block diagram).

Possible alternatives if you need two thresholds (e.g., 2.5 V and 3.0 V):

  1. Use two LPCMP instances (if available in your S32K3 chip), each with its own DAC setting.
  2. Software-controlled DAC update: After each RTC trigger or poll, reprogram the DAC to the next threshold before the subsequent comparison. Naturally, this adds latency and you lose fully autonomous round‑robin behavior.

Best regards,

Pavel

%3CLINGO-SUB%20id%3D%22lingo-sub-2253013%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K3%20LPCMP%20%E5%BE%AA%E7%8E%AF%E7%A8%8B%E5%BA%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253013%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%97%A8%EF%BC%8C%E4%B8%93%E5%AE%B6%E4%BB%AC%EF%BC%9A%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%88%91%E6%9C%89%E4%B8%80%E4%B8%AA%E5%85%B3%E4%BA%8E%20LPCMP%20%E5%BE%AA%E7%8E%AF%E5%8A%9F%E8%83%BD%E7%9A%84%E9%97%AE%E9%A2%98%E3%80%82%E6%88%91%E5%B7%B2%E7%BB%8F%E5%B0%86%E6%AF%94%E8%BE%83%E5%99%A8%E7%9A%84%E8%B4%9F%E8%BE%93%E5%85%A5%E5%9B%BA%E5%AE%9A%E5%88%B0DAC%E4%B8%8A%EF%BC%8C%E8%80%8C%E6%AD%A3%E8%BE%93%E5%85%A5%E6%9C%89%E4%B8%A4%E4%B8%AA%E9%80%9A%E9%81%93%E3%80%82%E6%AD%A4%E8%AE%BE%E7%BD%AE%E5%85%81%E8%AE%B8%E6%88%91%E4%BD%BF%E7%94%A8%20RTC%20%E8%A7%A6%E5%8F%91%E4%BF%A1%E5%8F%B7%E8%BD%AE%E8%AF%A2%E3%80%82%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%88%91%E7%9A%84%E9%97%AE%E9%A2%98%E6%98%AF%EF%BC%9A%E6%98%AF%E5%90%A6%E6%9C%89%E5%8F%AF%E8%83%BD%E4%B8%BA%E4%B8%A4%E4%B8%AA%E6%AD%A3%E8%BE%93%E5%85%A5%E9%80%9A%E9%81%93%E5%88%86%E5%88%AB%E8%AE%BE%E7%BD%AE%E4%B8%8D%E5%90%8C%E7%9A%84%20DAC%20%E5%80%BC%E3%80%82%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E4%BE%8B%E5%A6%82%EF%BC%9A%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%AD%A3%E8%BE%93%E5%85%A5%200%20%E4%B8%8E%202.5V%20DAC%20%E8%BE%93%E5%87%BA%E9%85%8D%E5%AF%B9%E3%80%81%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%AD%A3%E8%BE%93%E5%85%A5%201%20%E4%B8%8E%203.0V%20DAC%20%E8%BE%93%E5%87%BA%E9%85%8D%E5%AF%B9%E3%80%82%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%88%91%E7%9A%84%E7%90%86%E8%A7%A3%E6%98%AF%E4%B8%8D%E6%94%AF%E6%8C%81%E8%BF%99%E7%A7%8D%E9%85%8D%E7%BD%AE%EF%BC%8C%E4%B9%9F%E5%B0%B1%E6%98%AF%E8%AF%B4%E5%8F%AA%E8%83%BD%E4%BD%BF%E7%94%A8%E4%B8%80%E4%B8%AA%E5%9B%BA%E5%AE%9A%E7%9A%84%20DAC%20%E5%80%BC%E8%BF%9B%E8%A1%8C%E5%BE%AA%E7%8E%AF%E6%AF%94%E8%BE%83%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2253169%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K3%20LPCMP%20roundrobin%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253169%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3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