USB Enumration Failure on K70 with MQX4.0.2 with USB device stack

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB Enumration Failure on K70 with MQX4.0.2 with USB device stack

1,804件の閲覧回数
charleschen
Contributor I

Hi,

I'm new to USB. I'm trying to create a virtual com port on K70 which is running MQX4.0.2.  

    I have a ready-to-use project which is dedicated for the same customer K70 board with the same MQX RTOS. In this demo project, a virtual com demo has already run successfully. The USB stack is MQX USB device stack at full speed.

    I have copied all USB related files from this project to my project and compiling is OK. But when I connect a USB cable from this customer board to PC, PC doesn't recognize the USB device. And what I have observed from an oscilloscope is that customer board doesn't send out descriptor data after ACK packet to PC's setup command.

    Can any expert give a hint on how to find the cause? Thank you very much!

0 件の賞賛
返信
3 返答(返信)

1,798件の閲覧回数
myke_predko
Senior Contributor III

@charleschen 

In my experience, what you are describing is a clocking issue.  

How are you verifying that a 48MHz clock is getting to the USB module?  

0 件の賞賛
返信

1,784件の閲覧回数
charleschen
Contributor I
Thanks for helping on this topic, and I've solved this issue already. As to the clock, I'm sure the 48MHz is right. Since the hardware configuration is copied from the ready-to-use project that I've mentioned, so the clock configuration should be OK. Besides, I've checked the SIM-SOPT2 reg of K70 MCU, the bits of USBFSRC and USBF_CLKSEL fields matches the system setting(PLL0 used, 50MHz clk input, 240MHz output). The issue is resulted from the speed of different RAM memory. The ready-to-use project defines a dedicated RAM area in K70's internal SRAM for USB_BDT structure. While in my project, I did no such definition, so the compiler(IAR 6.5) put the USB_BDT at DDR2 memory area. On K70, access speed to DDR2 is about 70% of the speed of accessing K70's internal SRAM. And this causes the USB interrupt service routine can't get request from host in time, as well as can't send out the descriptor information immediately.

1,768件の閲覧回数
myke_predko
Senior Contributor III

@charleschen 

Glad to hear you figured out your problem.  

From what I've seen, clocking is the #1 reason for people to have problems when existing code is ported in - IRQ response would be #2 but I would think that's fairly unusual.  

 

0 件の賞賛
返信