FEI to FBI mode...mcg.c

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

FEI to FBI mode...mcg.c

979 次查看
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.

标记 (1)
0 项奖励
回复
3 回复数

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

701 次查看
ivanrusnacko
Contributor I

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

0 项奖励
回复

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