the seven modes of MPC5748G CMP module

cancel
Showing results for 
Search instead for 
Did you mean: 

the seven modes of MPC5748G CMP module

303 Views
shifeiqian
Contributor II

Dear Sir. or Mandam,

 

I have encountered some problem while configuring CMP module of MPC5748G. Attached is my two cmp test demo projects.

 

In project CMP_0 I have configured CMP_0 channel 0 (PG7), the positive input of CMP_0 is the voltage that I give, the negative input of CMP_0 is 3.3V, when the positive input is higher than the negative input, LED2 is turned on, when the positive input is lower than the negative input, LED1 is turned on. The disabled and continuous modes perform correctly, but the voltage of the CMP_0 output pin (PC10) dosen't change with the result of comparision.

 

In project CMP_2 I have configured CMP_2 channel 3 (PF2), the positive input of CMP_2 is the voltage that I give, the negative input of CMP_2 is 3.3V, when the positive input is higher than the negative input, LED2 is turned on, when the positive input is lower than the negative input, LED1 is turned on. The voltage of the CMP_2 output pin (PB10) changes with the result of comparision, but the continuous mode doesn't perform correctly.

 

In addition, if the continuous mode performs corrrctly and the output pin works, how to test the rest of the five modes in detail? Especially the three modes with the window? I am sitill very confused  with sample, filter and window even though after reading the datasheet of MPC5748G CMP module.

 

Could you please help me to find out what mistake I have made? Thank you very much for your help.

 

Yours sincrely!

QIAN Shifei

Original Attachment has been moved to: CMP.rar

Labels (1)
Tags (3)
0 Kudos
1 Reply

172 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I have tried to debug your first code (.elf), and it works to me, at least it toggles PC10 output when H->L or L->H compare even occurs.

Tomorrow I will prepare simple example code sharing it here subsequently.

0 Kudos