Problems with CMP0

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

Problems with CMP0

1,112 次查看
larsmagne
Contributor II

Hello,

I want to test the CMP0 on a FRDM-KL25Z board, but when I try to assign a value to CMP0_CR0 = 0x00 the MCU enter the default_isr on vector 3.

Any idea?

Regards

Lars Magne Endresen

0 项奖励
回复
2 回复数

901 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

You can read "12.2.8 System Clock Gating Control Register 4 (SIM_SCGC4) " of "KL25P80M48SF0RM".

CMP Clock Gate KL25.jpg

Hope my reply can help you.

Best Regards

Binbin

0 项奖励
回复

901 次查看
egoodii
Senior Contributor III

Enable the CMP module clock first, probably:

    SIM_SCGC4 |= SIM_SCGC4_CMP_MASK;

0 项奖励
回复