KL03 COMP input problem

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

KL03 COMP input problem

跳至解决方案
788 次查看
michaelschwarz
Contributor II

Hi,

I’m trying to create an application on KL03 FRDM which uses CMP0 to detect a signal and generate an interrupt. I configured the DAC output as negative input and a pin (PTA12) as positive input. I’m using KDS and Processor Expert.

The problem is the pin which should be the positive input pin has a voltage level of 3V. So it is impossible to detect a rising edge in my signal. Only if I connect the pin to GND and disconnect it again, an interrupt is created because the pin value returns from 0 to 3V. And PTA12 is not the only Pin with a fixed output voltage, there are several others as well.

Why is there 3V output on an input pin? Do I have to configure the input pin somewhere else than in the COMP-component as well?

Any help is appreciated

标记 (6)
0 项奖励
1 解答
650 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Michael,

I have checked the schematics, the PTA12 is connected to a node ACCEL_INT  which is logic output of MMA8451Q, pls remove the R26 on the KL03 frdm board and have a try. After removing R26, your issue will be solved I think.

BR

XiangJun Rong

在原帖中查看解决方案

0 项奖励
4 回复数
650 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Michael,

If you use the PTA12 pin as CMP0_IN0 function, of course, it is an input pin with high input impedance, the voltage on the input pin without external source is subject to noise if you test an input pin voltage with multi-meter. I suggest you connect an low impedance low frequency signal to the PTA12 pin and check if the CMP0 can trigger an interrupt, at the same time, check the output of the CMP.

It is meaningless to test the voltage of an input pin.

Hope it can help you.

BR

Xiangjun Rong

650 次查看
michaelschwarz
Contributor II

Hi Xiangjun,

Thanks for your reply. I tried again as you suggested to connect a low frequency square wave signal with 3V amplitude to PTA12 and watched the pin level with an oscilloscope.

The pin voltage level changes between about 2.5 and 3V instead of 0 and 3V. So for me it still seems like there is a real voltage level on this pin, not only measuring noise. It seems like this voltage pulls up my function generator signal. I then changed the DAC output to a value between 2.5 and 3V and the comparator works fine with it, but I need it to work with a voltage below 2.5V as well.

Is it possible that this voltage maybe comes from the FRDM-board and not from the µC?

Best regards

Michael

0 项奖励
651 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Michael,

I have checked the schematics, the PTA12 is connected to a node ACCEL_INT  which is logic output of MMA8451Q, pls remove the R26 on the KL03 frdm board and have a try. After removing R26, your issue will be solved I think.

BR

XiangJun Rong

0 项奖励
650 次查看
michaelschwarz
Contributor II

Hi Xiangjun,

I removed the R26 and now the comparator works fine. Thanks for your help!

Best regards

Michael

0 项奖励