USBHS PE Initialization crashes MCU

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

USBHS PE Initialization crashes MCU

559 Views
sam_
Contributor III

I created a processor expert USBHS and USBPHY module and added the initialization code that it generated to my K65 executable.  During the initialization, the USBHS code runs first (there isn't actually anything generated for the PHY init) and the MCU resets when it attempts to access the USBHS PORTSC1 register.  I would have expected the PHY to need to be initialized first (and the PLL locked) before the USBHS could be initialized.  Am I missing something?

The generated code attempts to clear some bits on the USBHS_PORTSC1 register.  For some of the values (PTC) it looks like it only clears the first bit rather than the entire field.  Is the code not generated correctly?  There are not a lot of things I can change without it complaining that it won't work (clock gates, endianness).  I have the USBHS set to device mode.

0 Kudos
1 Reply

395 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

Could you specify how you have created the USBHS and USBPHY components, please? Have you developed new components based on existing (inherited)?

The Kinetis Design Studio 3.0.0 provides the  Processor Expert Kinetis SDK USB Stack that is based on Kinetis SDK. You can use USB HID and MSD class components.

For example, open the help of the fsl_usb_framework component, select the General Info page and open the USB stack Processor Expert integration documentation by using the link. The Processor Expert Kinetis SDK USB Stack Integration User Guide is open. There are available instructions how to use USB components and how to create a demo application.

Best Regards,

Marek Neuzil

0 Kudos