USB driver & Clock initialization ?K66 MCU

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

USB driver & Clock initialization ?K66 MCU

1,328 Views
karthikas
Contributor IV

I am working with MK66 MCU with our own customized board .,

 

1.) I am using SDK_2.0_MK66FN2M0xxx18  stack , In that stack they are using USB1 with high speed (USB-HS) , In our board I am using USB0 and running in full speed , Can anyone tell me what are the changes need to be change in stack to switch from USB1 to USB0 .

 

2.) Can I generate core clock frequency (ex 180 MHZ) by using Internal clock resource without using external clock reference.  

Labels (1)
4 Replies

734 Views
ivadorazinova
NXP Employee
NXP Employee

Hello karthik AS,

Thank you for your question.

The current KSDK USB stack supports both high speed (EHCI) and full speed (KHCI).

As long as the board is capable of both EHCI and KHCI, e.g. twrk65f180m, you can build the target for EHCI or KHCI.

These changes need to be modify by the corresponding macros defined in USB Stack Configuration, usb_device_config.h

For full speed device KHCI
/*! @brief KHCI instance count */
#define USB_DEVICE_CONFIG_KHCI (1U)

/*! @brief EHCI instance count */
#define USB_DEVICE_CONFIG_EHCI (0U)


For high speed device EHCI
/*! @brief KHCI instance count */
#define USB_DEVICE_CONFIG_KHCI (0U)

/*! @brief EHCI instance count */
#define USB_DEVICE_CONFIG_EHCI (1U)

To your second question please refer to How to set the clock of desired frequency? here was the same question discussed.

Best Regards,

Iva

734 Views
karthikas
Contributor IV

Hai ivadorazinova,

Thank you for the help. 

The stack which I am using now is too large size, how can I build my own application by using stack.

0 Kudos

734 Views
ivadorazinova
NXP Employee
NXP Employee

Hi karthik AS,

Please what do you have for an issue? What do you have for application? Do you use existing example as a template for your application?

Please refer to USB examples located at C:\Freescale\KSDK 2.0\SDK_2.0_MK66FN2M0xxx18\boards\frdmk66f\usb_examples

Thank you for your feedback.

Best Regards,

Iva

734 Views
karthikas
Contributor IV

Hello.,

I have some problem in USB driver. The device is not properly detecting, In PC its showing unknown device, also I tried to update driver but its not happening. I have checked the properties of unknown device it doesn't have any information like PID,VID etc.

I have debug the code , I am getting reset interrupt, but not getting SOF(start of frame interrupt) instead i am getting port change interrupt,what's the mistake, Is there any changes has to be done in SDK_2.0_MK66FN2M0xxx18 stack. 

thank you..,

0 Kudos