PIT KL46Z - MCG_C1

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

PIT KL46Z - MCG_C1

1,544 次查看
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 项奖励
回复
1 回复

1,490 次查看
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 项奖励
回复