Problems with CMP0

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with CMP0

377 Views
larsmagne
Contributor I

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 Kudos
2 Replies

166 Views
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 Kudos

166 Views
egoodii
Senior Contributor III

Enable the CMP module clock first, probably:

    SIM_SCGC4 |= SIM_SCGC4_CMP_MASK;

0 Kudos