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

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

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

跳至解决方案
1,575 次查看
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,267 次查看
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,268 次查看
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,267 次查看
danielchai
Senior Contributor I

Hi Martin,

I will try it and let you know.

Thank you.

-Daniel