STM comparator and timer equivalence pin

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

STM comparator and timer equivalence pin

跳至解决方案
2,049 次查看
jhd
Contributor III

Hello,

I need use this stm pins of the comparator in kl05.

PA0.Signal=COMP1_INM6
PA1.Signal=COMP1_INP
PA4.Signal=COMP1_INM4
PA5.Signal=COMP1_INM5

Wich is the equivalence in MKL05Z32VFK4? In the datasheet only is possible to found CMP0_INx and CMP0_OUT. It's ok if I use only the inputs? CMP0_IN0 up to CMP0_IN3 ?

And I have the same problem with the Timers: I have used from TPM0_CH0 up to TPM0_CH5. It will work?

STM32                                         KL05

PA7PA7.Signal=TIM1_CH1NPTA5TPM0_CH5
PA8PA8.Signal=S_TIM1_CH1PTB9TPM0_CH2
PA9PA9.Signal=S_TIM1_CH2PTB10TPM0_CH1
PA10PA10.Signal=S_TIM1_CH3PTB11TPM0_CH0
PB0PB0.Signal=TIM1_CH2NPTA6TPM0_CH4
PB1PB1.Signal=TIM1_CH3NPTB8TPM0_CH3

Best regards

EDITED: I think that COMPx_INMx is the negative and the COMPx_INP the positive but in NXP is indifferent?

标签 (2)
1 解答
1,902 次查看
mjbcswitzerland
Specialist V

Hi

The KL05 compartor has a number of inputs that can be selected to be CMP+ or CMP-. That means that there are not inputs which are dedicated CMP+ or CMP- and you thus have full flexibility.

The TPM channel pins, when programmed to operate as channel inputs, can be programmed to be rising, falling or both-edge sensitive, so also don't have dedicated positive/negative pins.

Regards

Mark


Complete Kinetis solutions for professional needs, training and support: http://www.utasker.com/kinetis.html
Kinetis KL02/KL03/KL05:
- http://www.utasker.com/kinetis/FRDM-KL02Z.html
- http://www.utasker.com/kinetis/FRDM-KL03Z.html
- http://www.utasker.com/kinetis/FRDM-KL05Z.html

uTasker: supporting >1'000 registered Kinetis users get products faster and cheaper to market
Request Free emergency remote desk-top consulting at http://www.utasker.com/services.html

Open Source version at https://github.com/uTasker/uTasker-Kinetis

在原帖中查看解决方案

4 回复数
1,903 次查看
mjbcswitzerland
Specialist V

Hi

The KL05 compartor has a number of inputs that can be selected to be CMP+ or CMP-. That means that there are not inputs which are dedicated CMP+ or CMP- and you thus have full flexibility.

The TPM channel pins, when programmed to operate as channel inputs, can be programmed to be rising, falling or both-edge sensitive, so also don't have dedicated positive/negative pins.

Regards

Mark


Complete Kinetis solutions for professional needs, training and support: http://www.utasker.com/kinetis.html
Kinetis KL02/KL03/KL05:
- http://www.utasker.com/kinetis/FRDM-KL02Z.html
- http://www.utasker.com/kinetis/FRDM-KL03Z.html
- http://www.utasker.com/kinetis/FRDM-KL05Z.html

uTasker: supporting >1'000 registered Kinetis users get products faster and cheaper to market
Request Free emergency remote desk-top consulting at http://www.utasker.com/services.html

Open Source version at https://github.com/uTasker/uTasker-Kinetis

1,902 次查看
jhd
Contributor III


Thank you very much Mark, I supposed that but I was not sure.

Best regards

0 项奖励
回复
1,902 次查看
jhd
Contributor III

Can I connect this so?

REF_BUS   ---->  CMP0_IN0

REF_C        ---->  CMP0_IN1

REF_B        ---->  CMP0_IN2

REF_A        ---->  CMP0_IN3

cmp.png

With the stm chip is connect so:

REF_BUS   ---->  COMP1_INP 

REF_C        ---->  COMP1_IM6  

REF_B        ---->  COMP1_IM5

REF_A        ---->  COMP1_IM4

0 项奖励
回复
1,902 次查看
mjbcswitzerland
Specialist V

The STM32 COMP1 is similar to the CMP in the KL05 in as much as it can compare two inputs at a time.
That means that if you have been using the COMP1 to compare REF_BUS as the positive input with the negative inputs REF_A, REF_B and REF_C it will be polling the three by changing the negative input MUX.

In the case of the KL05 you can exactly the same thing.

Regrds

Mark

Note: uTasker based projects developed on STM32 parts can run on Kinetis parts by changing just the project define _STM32 to _KINETIS and redefining the pin connections to match the alternative device. Most HAL interfaces are compatible so application code can run on either.