This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Regarding register settings when swapping USB lines for data roles

Part Number: 66AK2G12

Tool/software:

Hi experts,

My customer is experiencing an issue with a product that uses the 66AK2G12.
They are currently investigating to determine if the problem is with the K2G.
-

  • The USB0 port is used in the default HOST setting, but when an iPad app is connected, the power role remains HOST and the data role switches from HOST to Function.
  • When this happens, audio noise is constantly mixed in (it's not that the connection itself is working and the sound is choppy, but rather that playback is occurring but there is constant noise superimposed on the audio).
  • From past experience, this is similar to a case where the cable length is being checked (using an extended cable to a length that does not conform to the USB standard (6m)).

Please explain the differences between using USB0 as a normal HOST and using it with a data role swap and switching to Function.

Q1: Are there any registers that are common before and after a data role swap, or registers whose references change depending on the data role?

Q2:Are there any areas where this symptom is likely to occur if register settings are not configured correctly when swapping data roles?

Best regards,
O.H

  • Hello O.H,

    Please note that we can no longer provide hardware or software design support for K2G.

    I am reassigning your thread to another engineer who may have some ideas about debugging USB function, but they may be unable to offer any additional support.

    Regards,

    Nick

  • Hi O.H,

    As Nick mentioned, we only provide very limited support for K2G devices. However, based on your description of the issue, I don't think the problem is in the registers related to USB roles. Typically USB audio application uses USB isoch transfers, which transmit the audio data samples in a fixed period. But for whatever reason, the audio samples got dropped, you would hear noise on the audio.

    If the noise is constant, is it possible it is analog noise from the PCB coupled to the USB cable? do you heard the constant noise when the audio playback is paused?

  • Hi O.H,

    Thank you for providing the details in the offline messages.

    It appears the software running on K2G is not Linux? I am unable to comment on anything about software if it is not Linux, but a few things to check if the issue is related to USB signal integrity:

    - Connect a USB logical analyzer between K2G USB and the IPad (? or Windows PC? I am confused about the USB host in the use case) to see if the USB bus trace provides any information about the USB transaction failure;

    - Test the K2G USB EysDiagram to see if it has good signal margin;

    - Run the same USB usecase on K2G EVM to see if the issue also happens on the EVM.

  • Hi Bin Liu,

    Thank you for your support.

    It appears the software running on K2G is not Linux? I am unable to comment on anything about software if it is not Linux, but a few things to check if the issue is related to USB signal integrity:

    As you pointed out, it is my understanding that they are using an RTOS, but I will check it including the information you provided.

    Best regards,
    O.H

  • Hi Bin Liu,

    Below are some comments from our customers.

    If the noise is constant, is it possible it is analog noise from the PCB coupled to the USB cable? do you heard the constant noise when the audio playback is paused?

    We are currently unable to verify this with other audio paths using the same signal source. (We are currently having this verified on-site.)

    It appears the software running on K2G is not Linux?

    It is an RTOS, not Linux.

    - Connect a USB logical analyzer between K2G USB and the IPad (? or Windows PC? I am confused about the USB host in the use case) to see if the USB bus trace provides any information about the USB transaction failure;

    - Test the K2G USB EysDiagram to see if it has good signal margin;

    Once the on-site verification is completed, we plan to check this next.

    - Run the same USB usecase on K2G EVM to see if the issue also happens on the EVM.

    While we have not yet determined that this is a faulty individual component, we believe that TI must be verifying the quality of products using an IC checker or similar environment before shipping.
    Q3: Could you please tell us in advance about TI's analysis environment at the time of shipping?

    Best regards,
    O.H

  • Hi O.H,

    we believe that TI must be verifying the quality of products using an IC checker or similar environment before shipping.

    What products, the K2G processors or the K2G EVM? What leads you to conclude the issue is in the K2G processor but not in signal integrity due to PCB design/layout or software bug on the custom board?

  • Hi Bin Liu,

    What products, the K2G processors or the K2G EVM?

    My question is about the K2G processor.

    What leads you to conclude the issue is in the K2G processor but not in signal integrity due to PCB design/layout or software bug on the custom board?

    The customer is currently isolating the issue, and has not yet determined that the chip is the problem. Therefore, we can put Q3 on hold for the time being. We have shared the hardware investigation information offline.

    This is a follow-up question.

    Please explain the TRM's "BOOTCFG_USB0_PHY_CTLx" registers.

    Q4: If the USB port data is initially set to Source and then the data role is swapped, are there any registers that the user must change?

    Q5: Are there classifications such as Source-only, Sink-only, or Source/Sink dual-purpose?
    Generally, the following is the idea, but is my understanding correct?

    Source-only: VAL_DRVVBUS, SEL_DRVVBUS (CTL1)
    Sink-only: VBUSVLDEXT (CTL0), OTGTUNE (CTL2), VBUSVLDEXTSEL (CTL4)
    Common: Other than the above

    Best regards,
    O.H

  • Hi O.H,

    Please explain the TRM's "BOOTCFG_USB0_PHY_CTLx" registers.

    Q4: If the USB port data is initially set to Source and then the data role is swapped, are there any registers that the user must change?

    The USB PHY doesn't have any register which is related to USB roles.

    Q5: Are there classifications such as Source-only, Sink-only, or Source/Sink dual-purpose?
    Generally, the following is the idea, but is my understanding correct?

    Source-only: VAL_DRVVBUS, SEL_DRVVBUS (CTL1)
    Sink-only: VBUSVLDEXT (CTL0), OTGTUNE (CTL2), VBUSVLDEXTSEL (CTL4)

    Software do not need to touch any of the USB PHY registers for any of the USB use case - host-only, device-only, or dual-role.

  • Hi Bin Liu,

    Thank you for your reply.

    Below are some comments from our customers.

    I understand that there is no need for users to interact directly with USB PHY registers, but I have some additional questions.

    Q5-2: Could you specify which registers are configured when using the USB PHY as a "host" and which are configured when used as a "device"?

    Q5-3: When the USB PHY changes from a host to a device through data role swap, are there any registers whose settings change or become activated? For example, when changing from host to device, does the setting of registers related to device operation, such as "usb*_phy_pc_sqrxt une," change or become activated?

    Best regards,
    O.H

  • Hi O.H,

    Linux kernel only has drivers for the USB controller, but the kernel doesn't have a driver for the USB PHY. Linux doesn't operate any register of the PHY. I don't know any answer of your questions.

  • Hi Bin Liu,

    Thank you for your reply. I shared it with my customers.  I will consult with you if additional questions arise.

    Best regards,
    O.H