After configure the clock, how to disable the USB in BSP?

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

After configure the clock, how to disable the USB in BSP?

ソリューションへジャンプ
1,560件の閲覧回数
danielchai
Senior Contributor I

Hi,

After I re-configure the clock for my target board, I compile the bsp project. But it gives me error:

"

Errors caused tool to abort.

mingw32-make: *** [Peripheral IO Drivers/usb_dcc/int/usb_dcd_int_kn_c.obj] Error 1

mingw32-make: *** [Peripheral IO Drivers/usb_dcc/polled/usb_dcd_pol_kn_c.obj] Error 1

mingw32-make: *** [Peripheral IO Drivers/usb/usb_mk60f_c.obj] Error 1

Errors caused tool to abort.

mingw32-make: *** [Peripheral IO Drivers/usb/usb_install_c.obj] Error 1

mingw32-make: *** [Peripheral IO Drivers/usb_dcc/usb_dcd_mk60_c.obj] Error 1

"

And I checked with freescale engineer, he said the clock frequency I am using is too low to support USB part.(Just 32.768KHz from EXTAL32&XTAL32)

On my target board, I don't want to include the USB part in bsp. How could I do to disable it?

Thank you.

-Daniel

1 解決策
1,252件の閲覧回数
c0170
Senior Contributor III

Hello Daniel Chai,

I would start by removing these "references to usb":

1. any usb header include from bsp.h.

2. Remove the following lines from init_bsp.c

/* Install the USB DCD driver */

#if BSPCFG_ENABLE_USBDCD

   _kusb_dcd_polled_install("usbdcd:", &_bsp_usb_dcd_init);

#endif

   /* Install the USB DCD driver */

#if BSPCFG_ENABLE_IUSBDCD

   _kusb_dcd_int_install("usbdcd:", &_bsp_usb_dcd_init);

#endif

3. remove all usb functions defined in init_gpio.c (they will be removed by linker if not referenced though)

4. init_usb.c and init_usb_dcd.c remove from the bsp project.

That should be. Let us know the aftermath.

Regards,

0xc0170

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,253件の閲覧回数
c0170
Senior Contributor III

Hello Daniel Chai,

I would start by removing these "references to usb":

1. any usb header include from bsp.h.

2. Remove the following lines from init_bsp.c

/* Install the USB DCD driver */

#if BSPCFG_ENABLE_USBDCD

   _kusb_dcd_polled_install("usbdcd:", &_bsp_usb_dcd_init);

#endif

   /* Install the USB DCD driver */

#if BSPCFG_ENABLE_IUSBDCD

   _kusb_dcd_int_install("usbdcd:", &_bsp_usb_dcd_init);

#endif

3. remove all usb functions defined in init_gpio.c (they will be removed by linker if not referenced though)

4. init_usb.c and init_usb_dcd.c remove from the bsp project.

That should be. Let us know the aftermath.

Regards,

0xc0170

0 件の賞賛
返信
1,252件の閲覧回数
danielchai
Senior Contributor I

Hi Martin,

I will try it and let you know.

Thank you.

-Daniel