USB High speed problem K20 120 MHz

cancel
Showing results for 
Search instead for 
Did you mean: 

USB High speed problem K20 120 MHz

Jump to solution
288 Views
kamransial
Contributor I

I am using kinetis k20 microcontroler to run example code high speed hid device of K70 from Freescalw usb stack v4.1.1. I have changed the header files and removed some errors when i connect the usb with the pc it says enumeration failed and when i run it in debug mode it is constantly in interrupt service routine of usbhs. in isr i read USBHS_USBSTS register and it gives 0x01C4.

can anybody tell me why it is in interupt service routine constantly?  

Tags (2)
0 Kudos
1 Solution
69 Views
mjbcswitzerland
Specialist V

Hi

You need to check which of the interrupts are enabled by looking in USBHS_USBINTR.

USBHS_USBINTR & USBHS_USBSTS will then show which interrupt is pending.

Regards

Mark

P.S. Possibly the SOF interrupt is enabled which would cause an interrupt every 125us and look like it is constanly present if stepping the IRQ routine with a debugger; it is virtually impossible to use a debugger with USB device (especially in the enumeration phase) since even very short periods where the device doesn't respond as the host expects will cause failure.

View solution in original post

0 Kudos
1 Reply
70 Views
mjbcswitzerland
Specialist V

Hi

You need to check which of the interrupts are enabled by looking in USBHS_USBINTR.

USBHS_USBINTR & USBHS_USBSTS will then show which interrupt is pending.

Regards

Mark

P.S. Possibly the SOF interrupt is enabled which would cause an interrupt every 125us and look like it is constanly present if stepping the IRQ routine with a debugger; it is virtually impossible to use a debugger with USB device (especially in the enumeration phase) since even very short periods where the device doesn't respond as the host expects will cause failure.

View solution in original post

0 Kudos