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.

USB DeviceMode[2]

Dear all,

We're having the following trouble running the USB in DeviceMode on C6A8168 custom board.

 

(1) D+ and D- do not switch to Low state when power is supplied.(Host is not connected)

(2) D+ does not shift to PullUp state when 1is fixed to SOFTCONNbit in USB_POWER Register.

(3) We have unwanted SESSREQ Interrupt during the device mode.

 

We've changed the circuit so that it won't supply power.

We've designed the plan referring to TMDXEVM8168DDR2.

 

We've taken the following measure to switch to DeviceMode.

 

(a) Supply Clock after ModuleReset.

(b) Switch to DeviceMode. (Fix 1 to bit 7 and 8 in USB0/1_MODE register.)

(c) Confirm B-device by checking bit 7 in USBn_DEVCTL Register.

 

We'd like to ask you the following question.

 

(Q1) If there is any insufficiency in hardware setting originating from (1), please let us know.

We'd also like to know if there is any relation between (1) and (2).

(Q2) As for (2), it might be the case that Vbus is not detected, but we're not sure.

If there is any insufficiency in initial setteing that is responsible for the negative reaction of SOFTCONN (or Vbus, if that is the case), please tell us.

(Q3) Is the device running in regular operation when we detect SESSREQ Interrupt during DeviceMode?

 

Your help would be appreciated.

 

  • Hi,

    If you are trying to debug the issue do the following:

    If you have initialized the USB controller properly and POWER.SoftConn is set, the pull up on the D+ will be enabled when a 5V power is received from the attached Host.

    At this time the SESSION bit would be set too. This is the time where the DEVCTL.BDevice content is meaningful. If SESSION bit is not set, it is not meaningful.

    D+ will only be pulled high if 5V power is on the VBUS line. If want to debug this, supply 5V on the VBUS. You should see D+ going high. Also SESSION bit will be set.

    In Device Mode, the first useful interrupt you need to receive is RESET interrupt. You might be getting Babble interrupt but you can ignore that at this stage. This is going to happen when the Host pulls both D+ and D- line low.

    The Handshake between the Host and the Device is as follows:

    Since Host pulls both D+ and D- LOW with 15KOhms resistor, it will detect a Device presence when one of the Data lines is pulled High. This also generates a Connect Interrupt.

    Device uses the VBUS power to enable its 1.5KOhms pull-up resistor and uses the power on the VBUS line. Also this indirectly is used to detect a Host.

    Once the Host detects a Device is present (it observes that one of the Data lines is pulled high), it will perform a BUS RESET by pulling both Data Lines Low. This would generate a RESET interrupt on the Device side.

    Best regards, Zegeye

  • Hi,

    Session Request interrupt is used in OTG envirnoment and is only meaningful when operating as a Host.

    Not sure why you are getting this interrupt if configured as a Device.

    Best regards, Zegeye