FEI to FBI mode...mcg.c

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

FEI to FBI mode...mcg.c

764 Views
ivanrusnacko
Contributor I

Hi, I am having problem with going from default FEI mode to FBI mode...I am using the "mcg.c" function to do this, but it always gives memory access error when it tries to write into MCG_C1 register to change CLKS bits...I didnt change the mcg.c, so I am curious why is this happening.

Tags (1)
0 Kudos
3 Replies

486 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Ivan,

Could you let me know which Kinetis product you are using? With that info,  I could find related Kinetis exmpale source and mcg driver, then I will test that driver on my side. Thank you for the understanding.

B.R.

Ma Hui

0 Kudos

486 Views
ivanrusnacko
Contributor I

kl05 and using slow irc(with fast irc it is ok)

0 Kudos

486 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I do a test with KL05 source code and could get MCG works in FBI (slow irc) with below code:
      //test FBI mode with slow clock
    SIM_CLKDIV1 = ( 0
          | SIM_CLKDIV1_OUTDIV1(0)
          | SIM_CLKDIV1_OUTDIV4(0) );
      mcg_clk_hz = fei_fbi(32768,SLOW_IRC);
      clk_out_init();
      while(1);

And I could measure the PTA15 pin with 32.768KHz clock output.
Please check below attached scope copy.

KL05 CLKOUT Signal.jpg
For the system clock is 32.768KHz, which is too slow. At this situation, the debugger tool will lost connection.
Wish it helps.

B.R.

Ma Hui

0 Kudos