FRDMK22 enable PEE mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FRDMK22 enable PEE mode

1,096件の閲覧回数
claudiobrunelli
Contributor II

Hi.

I'd like to move my frdmk22 board, to PEE clock mode but I can't see different clock even changing values

in the below code.

Do I forget something ? Or ther's something wrong in my code ?

Thanks in advance...

Claudio

void PEE_InitMode(void)
{
    MCG->C2 = 0x2C;
    MCG->C1 = 0x98;
    while ((MCG->S & MCG_S_OSCINIT0_MASK) == 1)    ;    
    while ((MCG->S & MCG_S_IREFST_MASK) == 0);        
    while ((MCG->S & MCG_S_CLKST(10)) == 0x10);

    MCG->C5 = 0x03;  // /4
    MCG->C6 = 0x41;  // *25
    while ((MCG->S & MCG_S_PLLST_MASK) == 1);
    while ((MCG->S & MCG_S_LOCK0_MASK) == 1);

    MCG->C1 = 0x01;
    while ((MCG->S & MCG_S_CLKST(01)) == 0x01);

    SIM->SOPT2 |= SIM_SOPT2_PLLFLLSEL_MASK;
}

ラベル(2)
0 件の賞賛
返信
3 返答(返信)

971件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Claudio Brunelli,

   Enable the PEE mode need to follow this diagram.

pastedImage_1.png

I use the KDS PE create a project which is configuring the PEE mode,

pastedImage_2.png

I attach the project for your reference.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

971件の閲覧回数
claudiobrunelli
Contributor II

Hi Kerry.

Sorry the delay in answering you. I prefer don't use PE. But I'm going to try your suggestion to use PE generated code. I will write soon as I can try.

Thanks.

Claudio

0 件の賞賛
返信

971件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Claudio,

   PE code is just for your reference, you can don't use it, but just follow the code process write your own code.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信