Crystal-less USB operation on Kinetis FRDM64F platform with IRC48M.

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

Crystal-less USB operation on Kinetis FRDM64F platform with IRC48M.

ソリューションへジャンプ
1,271件の閲覧回数
qingjunwang
Contributor III

Hi,I try to start MQX 4.1.1 on FRDM64F platform with IRC48M. According to the AN4905 documentation,do the relevant configuration. but each time OS is stopped in PBE mode, wait until external reference clock is selected as MCG output. I am very upset, please expert help, thank you!

According to document, I use PE to do the configuration, But still not solve the problem.

PE configuration as follows:

14939_14939.pngcss0.png

14940_14940.pngcss1.png

14941_14941.pngcc0.png

14942_14942.pngcc1.png

14943_14943.pngcc2.png

Add the following content in the _bsp_initialize_hardware(void) functions:

/* SIM_CLKDIV2:USBDIV = 0, USBFRAC = 0*/

SIM_CLKDIV2 = (uint32_t)0x0UL;

/* Configure USB to be clocked from IRC 48MHZ */

SIM_SOPT2_REG(SIM_BASE_PTR) |= SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_PLLFLLSEL(3);

/*Enable USB-OTG IP clocking */

SIM_SCGC4_REG(SIM_BASE_PTR) |= SIM_SCGC4_USBOTG_MASK;

/* Enable IRC48MHZ for USB module*/

USB0_CLK_RECOVER_IRC_EN = 0x03;

/* MCG_C7: OSCSEL = 10*/

MCG_C7 |= 0x2u;

/* USB_CLK_RECOVER_CTRL: CLOCK_RECOVER_EN = 1*/

USB0_CLK_RECOVER_CTRL |= ( 1UL << 7);

The problem is OS stay on the PBE patterns, wait until external reference clock is selected as MCG output or wait until PLL is locked.

Thank you!

1 解決策
813件の閲覧回数
qingjunwang
Contributor III

配置MCG为BLPE模式,主频48MHZ,配置成功!

元の投稿で解決策を見る

5 返答(返信)
814件の閲覧回数
qingjunwang
Contributor III

配置MCG为BLPE模式,主频48MHZ,配置成功!

813件の閲覧回数
johnbaker
Contributor IV

That is good!  Congratulation.

0 件の賞賛
813件の閲覧回数
fengzengyan
Contributor I

hope the freescale official providing the demo for K64 without external crystals on the crystal-less USB operation.

0 件の賞賛
813件の閲覧回数
johnbaker
Contributor IV

Hi Quinjun,

I am no Processor Expert, but please look at the attached system_MK64F12.c file.  I do bare board programming and KDS places this file in the startup folder to initialize the clocks.  It should help you.

John Baker

813件の閲覧回数
qingjunwang
Contributor III

Hi John Baker!

I use system_MK64F12.c debug bare board program, stop in exception hardfault.

I doubt MK64F cannot work without external crystals and only IRC48M cases. The official did not provide a demo program with IRC48M on K64,K63 or K24 family devices.

Thank you!

Qingjun Wang