PIT KL46Z - MCG_C1

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

PIT KL46Z - MCG_C1

486 Views
Ricky1
Contributor I

I've been trying to put a 1 on the sixth bit of the register in the title to set the Clk to the internal reference one but the MCU has been sending that message.

Does anyone know what is the issue?

Thanks.

0 Kudos
Reply
1 Reply

432 Views
RaRo
NXP TechSupport
NXP TechSupport

Hello @Ricky1,

Could you please check which value does the CLKS field have before changing the sixth bit? An CLKS 11b value is Reserved and could create issues. You could change the whole field with:

MCG->C1 =  ((MCG->C1 & ~(MCG_C1_CLKS_MASK))) | (MCG_C1_CLKS(kMCG_ClkOutSrcOut);

Also, this configuration could be made in BOARD_InitBootClocks(). That part of the code usually takes care of clock settings.

Best regards, Raul.

0 Kudos
Reply