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

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

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

Jump to solution
1,554 Views
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 Solution
1,246 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
1,247 Views
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 Kudos
Reply
1,246 Views
danielchai
Senior Contributor I

Hi Martin,

I will try it and let you know.

Thank you.

-Daniel