imx6 USB OTG port is not functioning correctly after some time

cancel
Showing results for 
Search instead for 
Did you mean: 

imx6 USB OTG port is not functioning correctly after some time

2,686 Views
karthigeyannata
Contributor III

We are operating iMX6 USB OTG port in device mode. We are able to connect the host device and start the transfer.

But after few seconds of working, imx6 USB OTG port is not responding to IN packet sent by Host device.

Based on our understanding, USB device controller should send atleast the NAK packet for the IN token from the Host?

Are there any known issues in imx6? Could you please advise on how to debug this issue further?

Are there any test daemons available to check the USB transfer between PC and imx6 USB device?

Labels (1)
Tags (1)
17 Replies

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Karthigeyan

I would recommend to check boar with SDK USB test

i.MX 6Series Platform SDK : Bare-metal SDK

also issue may be related to DDR errors, one can update calibration

settings

https://community.freescale.com/message/331721#331721

https://community.freescale.com/docs/DOC-96412

Best regards

chip

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

356 Views
karthigeyannata
Contributor III

Thanks for your comments. Please note that this issue is not happening in the standalone setup.

We could re-produce this issue only when the Graphics/GUI engine is running in parallel.

Problem:

Imx6 USB OTG port is configured in device mode.  We are able to connect the USB Host device and do the data transfer.

But after few packets data transfer, imx6 USB device controller is not responding to  PING and IN token sent by Host device.

Refer the attached snapshot for the details.  As per our understanding , responding to IN token is done the USB core in the HW and not in the SW.

What we need from freescale:

  1. List of all Possible root causes for this issue
  2. Are there any known workarounds/fixes for the above problem? (or) Any other inputs to further debug this issue?
  3. Need test utility to verify the data transfer when the imx6 USB OTG port is operating in device mode.

USB_Failure.png

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Karthigeyan

definitely this is DDR issues or power supplies (ripples, spikes).

Check them all carefully.

Graphics/GUI engine produces tremendous current spikes.

Just for test you can decrease operating frequency.

Best regards

chip

0 Kudos

356 Views
karthigeyannata
Contributor III

Thanks for the feedback. Could you please advise on which operating frequency to reduce and check and how much? Is it core clock or GPU clock or DDR clock?

Please advise

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Karthigeyan

try to change them all: core, DDR frequencies

and check by oscilloscope power lines.

200,400MHz may as test points.

Best regards

chip

0 Kudos

356 Views
karthigeyannata
Contributor III

Thanks for the feedback.  Are you referring to check USB VBus power line or Power lines to imx6 ?

We have reduced the CPU clock to 400mhz , but still the same issue occurs.

Need few clarifications:

1.You have mentioned the problem is due to DDR /Power supplies. Could you please help us on how you are correlating the above mentioned USB controller behavior with DDR/Power supplies?

2.As mentioned in the above logs , the imx6 USB OTG controller is not reponding to IN and PING packets. As per our understanding, this is supposed to be done by the HW USB core itself and not by the USB SW driver ? Is it correct?

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

I meant power lines to imx6.

1. correlation from practice. usually this is caused by

DDR errors or power supply ripples.

2. this may be caused both.

Also it may be suugested to run minimal linux image and check

behaviour.

0 Kudos

356 Views
karthigeyannata
Contributor III

Thanks for the feedback

>>On your suggestion" Also it may be suugested to run minimal linux image and check behaviour"

We have the following TWO observations

1. This issue is not happening if we reduce the GUI engine processing in our carplay application

Apple iPhone (acting as USB Host)-<>imx6 (acting as device).

2. For debugging purpose, we have tested the data transfer between PC and imx6. In this setup, USB data transfer is working even if we DONT reduce the GUI engine processing

PC (acting as USB Host)-<>imx6 (acting as device).

Please advise.

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Still I think that this may happen due to some

power/noise issues.

Also this may be caused by Apple iPhone - probably  its

USB protocol is not correctly handled by i.MX6.

I think you can check with Apple iPhone vendor what can be

problem.

0 Kudos

356 Views
karthigeyannata
Contributor III

We have done requested tests

-There is no problem with Power

-There is no problem with DDR

-There is no problem with Apple device since the functionality works when we reduce the graphics processing which uses GPU/IPU drivers.

During the normal condition, Are there a possibility that imx6 not responding to IN & PING packet when the imx6 device operating in device mode?

This issue is pending for long time. Could you please support us for the next steps?

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

To be able to support that, we should be able

to reproduce this issue. Could you provide steps to reproduce

it using Freescale reference board/BSP and some commonly

used USB device.

0 Kudos

356 Views
karthigeyannata
Contributor III

It may not be easy to port our SW to freescale reference board. It is huge effort for us. Kindly provide the alternate options.

Please answer my question in previous context :" During the normal condition, Are there a possibility that imx6 not responding to IN & PING packet when the imx6 device operating in device mode?"


In other way, if imx6 should not MISS to respond to even ONE IN & PING packet. If it is missing, then it is considered as abnormal. Is this statement true?


Acknowledging IN& PING packet can be done automatically by mx6 USB core  without software intervention. Is our understanding correct?. If not , please provide the details

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Karthigeyan

unfortunately some problems can be found only running real

board at hand. BTW there is another support path: you can apply to Freescale Professional Services:

http://www.freescale.com/webapp/sps/site/overview.jsp?code=CW_PROFESSIONAL

>:" During the normal condition, Are there a possibility that imx6 not responding to IN & PING

>packet when the imx6 device operating in device mode?"


There is no such possibility, provided that hardware is OK and running correctly written software.


>In other way, if imx6 should not MISS to respond to even ONE IN & PING packet. If it is

>missing, then it is considered as abnormal. Is this statement true?


Yes.


>Acknowledging IN& PING packet can be done automatically by mx6 USB core  without

>software intervention. Is our understanding correct?. If not , please provide the details


Corect. Provided that hardware is OK and running correctly written software.


Best regards

chip

0 Kudos

356 Views
karthigeyannata
Contributor III

Could you please clarify  the meaning "running correctly software" written in the above email?

We are using USB drivers provided by freescale. Are there any known issue related to this?

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Karthigeyan

as far as remember you answered before:

"It may not be easy to port our SW to freescale reference board."

So seems you changed software and it is not possible to answer

what is wrong in it. So I asked you provide steps to reproduce

issue using Freescale reference board/BSP and some commonly

used USB device.

Best regards

chip

0 Kudos

356 Views
karthigeyannata
Contributor III

We have not changed any SW in the USB driver which is provided by freescale. What i meant is porting to our graphics engine is difficult

Please let us know your views considering this.

0 Kudos

356 Views
igorpadykov
NXP TechSupport
NXP TechSupport

I think you can build minimal image

(without "our graphics engine") with

Freescale BSP and test this case on

Freescale reference board.

0 Kudos