I'm using the MCUXpresso SDK USB version 2.2.1 with MCUXpresso SDK 2.6.2. Disconnect a device sometimes causes the host task (USB_HostEhciTaskFunction) to hang in USB_HostEhciPortChange. The break condition is never satisfied so the code spins in the while(1) loop. My application code is based on the USB_host_cdc example and the CONTROLLER_ID I'm using is kUSB_ControllerEhci0.
Hello Jeffery,
Hope you are doing well.
Could you please confirm the microcontroller you are using so that I can test it from my end?
Also, is this reproducible using the example directly or were there modifications made?
Best Regards,
Sabina
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Sabina,
I hope you and yours are safe and well.
I’m using the MIMXRT1062DVJ6A. I did not try this with the example code, but I’ve made no changes to the USB_HostTaskFn, and run it as a separate task. My changes are to the USB_HostCdcTask, where I make calls to my application from the DEV_Attached and DEV_Detached state changes.
Jeff Thompson | Senior Electrical Engineer-Firmware
+1 704 752 6513 x1394
Now I'm now longer able to duplicate the problem, so there must have been something subtle that I did to break it. I'll definitely be looking for it to reappear, and will try to duplicate it.
Not a problem, let me know if you are able to reproduce the issue.
Best Regards,
Sabina
Hello Jeffery,
Thank you.
I have made a test with the hostcdc example by attaching and detaching a device and had no problems.
Could you please try using the example and attempt the same. Is the behavior the same as you are experiencing?
If so, could you please provide more details so that I can check it with detail. Such as the code, the type of device you are connecting. If possible please reproduce the behavior on our evaluation board so that I can work with it
Best Regards,
Sabina
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------