USB High speed problem K20 120 MHz

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

USB High speed problem K20 120 MHz

跳至解决方案
1,355 次查看
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?  

标记 (2)
0 项奖励
回复
1 解答
1,136 次查看
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.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,137 次查看
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.

0 项奖励
回复