S32K3 LPCMP roundrobin

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K3 LPCMP roundrobin

Jump to solution
845 Views
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 Kudos
Reply
1 Solution
821 Views
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

View solution in original post

1 Reply
822 Views
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%20roundrobin%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2253013%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%20experts%3A%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20have%20a%20question%20regarding%20the%20round-robin%20function%20of%20the%20LPCMP.%20I%20have%20fixed%20the%20negative%20input%20of%20the%20comparator%20to%20the%20DAC%2C%20while%20there%20are%20two%20channels%20for%20the%20positive%20input.%20This%20setup%20allows%20me%20to%20use%20the%20RTC%20to%20trigger%20polling.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMy%20question%20is%3A%20whether%20it%20is%20possible%20to%20set%20different%20DAC%20values%20for%20the%20two%20positive%20input%20channels%20respectively.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EFor%20example%2C%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Epositive%20input%200%20is%20paired%20with%20a%202.5V%20DAC%20output%2C%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eand%20positive%20input%201%20is%20paired%20with%20a%203.0V%20DAC%20output.%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EMy%20understanding%20is%20that%20this%20configuration%20is%20not%20supported%2C%20meaning%20only%20a%20single%20fixed%20DAC%20value%20can%20be%20used%20for%20the%20round-robin%20comparison.%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%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F193092%22%20target%3D%22_blank%22%3E%40PINKMAN%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EYour%20understanding%20is%20correct.%20In%20the%20LPCMP%20round%E2%80%91robin%20mode%2C%20the%20one%20input%20can%20be%20cycled%20across%20multiple%20channels%20(e.g.%2C%20IN0%2C%20IN1)%2C%20while%20the%20other%26nbsp%3Binput%20is%20fixed%20to%20a%20single%20source%20-%20the%20internal%20DAC.%20The%20LPCMP%20round-robin%20switch%20does%20not%20control%20the%20DAC.%3C%2FP%3E%0A%3CP%3EIn%20other%20words%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EYou%20can%20select%20multiple%20positive%20input%20channels%20for%20polling.%3C%2FLI%3E%0A%3CLI%3EOnly%20one%20DAC%20setting%20is%20used%20as%20the%20reference%20(negative%20input)%20for%20the%20entire%20round%E2%80%91robin%20sequence.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThis%20aligns%20with%20the%20S32K3%20Reference%20Manual%2C%20Rev.%2011%2C%20Figure%20263%20(LPCMP%20block%20diagram).%3C%2FP%3E%0A%3CP%3EPossible%20alternatives%20if%20you%20need%20two%20thresholds%20(e.g.%2C%202.5%20V%20and%203.0%20V)%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EUse%20two%20LPCMP%20instances%20(if%20available%20in%20your%20S32K3%20chip)%2C%20each%20with%20its%20own%20DAC%20setting.%3C%2FLI%3E%0A%3CLI%3ESoftware-controlled%20DAC%20update%3A%20After%20each%20RTC%20trigger%20or%20poll%2C%20reprogram%20the%20DAC%20to%20the%20next%20threshold%20before%20the%20subsequent%20comparison.%20Naturally%2C%20this%20adds%20latency%20and%20you%20lose%20fully%20autonomous%20round%E2%80%91robin%20behavior.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FDIV%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E