Problems with CMP0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems with CMP0

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

368 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

368 Views
egoodii
Senior Contributor III

Enable the CMP module clock first, probably:

    SIM_SCGC4 |= SIM_SCGC4_CMP_MASK;

0 Kudos