USD endpoint busy forever

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

USD endpoint busy forever

664件の閲覧回数
martindusek
Contributor V

Hi,

I implemented custom USB class with two interrupt and one bulk endpoint. I used usb_device_cdc_acm.c from SDK 2.1 as a template. USB device is full speed on MK22.

Sometimes the bulk endpoint freezes in busy state. On PC side reading from the bulk endpoint timeouts then (libusb_bulk_transfer used on PC side) even though on MCU side I can see the endpoint is in busy state transferring data.

Structure s_UsbDeviceKhciState has tranferLength = 0x28a, transferDone = 0 and state = 0x6040 forever. I have to reset MCU to reenable data transfers on my bulk endpoint.

Can you please help me diagnose the problem?

EDIT: It seems that the issue is caused by switching from HSRUN to RUN mode with USB module enabled. My CPU have to run with 120 MHz, but sometimes I need to write internal flash memory, which is not possible from HSRUN mode so I have to switch to RUN. When I don't switch from HSRUN to RUN and I disable writing to flash then this issue with frozen bulk endpoint doesn't happen, at least it seems to.

ラベル(2)
0 件の賞賛
返信
1 返信

528件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Could you let us know the K22 product part number?

There with some different version of K22 product, please check here for the detailed info.


Have a great day,
Mike

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信