TWR-K70 won't start in PEE mode

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

TWR-K70 won't start in PEE mode

Jump to solution
1,749 Views
AlexandruGandra
Contributor I

Hello,

Let me start with saying that I am new to Kinetis family .

I have a K70 revC and I want to use it as a standalone but I am having trouble setting it to 120MHz. I am using Processor Expert and it works when setting it to FEE @ 80MHz. Now, when I try to setup the PEE mode it never gets initialized (when pausing in debug it stops here)

 

/* Switch to PBE Mode */

/* MCG_C6: LOLIE0=0,PLLS=1,CME0=0,VDIV0=0x0E */

while((MCG_S & 0x0CU) != 0x08U) {    /* Wait until external reference clock is selected as MCG output */

}

while((MCG_S & MCG_S_LOCK0_MASK) == 0x00U) { /* Wait until PLL locked */  <--- STOPS HERE

}

 

I know it must transition to diferent modes before entering PEE, but it seems Processor Expert does this for me.

 

Can anyone tell me what I am doing wrong? (I attached the project and the jumpers setting)

Thanks!

 

Original Attachment has been moved to: test120.rar

Labels (1)
0 Kudos
Reply
1 Solution
1,290 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

The TWR-K70F120M board provides two external clock source for system oscillator 0 & 1. System oscillator 0 connects with external clock 50MHz ; system oscillator 1 connects with external crystal 12MHz.
For external clock 50MHz as reference clock, you can refer below setting to run the MCG in PEE mode with 120MHz core clock.
The attached project with [Flash] target is using 12MHz clock external crystal to generate 120MHz core clock, MCG in PEE mode.
There is an errata for K70 product, e3925: JTAG/OSC: JTAG enables digital input buffers.
So I would recommend not to debug the [Flash] target, which could be run after program the code to K70 Flash.
More detailed info, please check below link:

http://cache.freescale.com/files/microcontrollers/doc/errata/KINETIS_1N96B.pdf

Wish it helps.

B.R.

Ma Hui

View solution in original post

0 Kudos
Reply
3 Replies
1,291 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

The TWR-K70F120M board provides two external clock source for system oscillator 0 & 1. System oscillator 0 connects with external clock 50MHz ; system oscillator 1 connects with external crystal 12MHz.
For external clock 50MHz as reference clock, you can refer below setting to run the MCG in PEE mode with 120MHz core clock.
The attached project with [Flash] target is using 12MHz clock external crystal to generate 120MHz core clock, MCG in PEE mode.
There is an errata for K70 product, e3925: JTAG/OSC: JTAG enables digital input buffers.
So I would recommend not to debug the [Flash] target, which could be run after program the code to K70 Flash.
More detailed info, please check below link:

http://cache.freescale.com/files/microcontrollers/doc/errata/KINETIS_1N96B.pdf

Wish it helps.

B.R.

Ma Hui

0 Kudos
Reply
1,289 Views
AlexandruGandra
Contributor I

I did a quick test and it seems to work :smileygrin:. However my led doesn't blink as quick as for 120MHz, or I misscalculated something (Will check later).

So the problem seems like it was wrong values in ProcessorExpert.

Thanks a lot!

0 Kudos
Reply
1,290 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I am checking with your issue, I will let you know when I got some updated info. Thank you for the patience.

B.R.

Ma Hui

0 Kudos
Reply