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.

AM335x USB OTG state 8

Dear support teams,

  I am testing the USB auto reboot by OTG port connected to a USB Keyboard.

 after several loops, the OTG state will be wrong to 8 and the test failed.

 Does anyone know the state 8 means?

Thank you.

PID:00400002 TID:02F5000A CAM3xxOTG::PollThread(): Polling...
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A +USBOTG::EventNotification OtgState=4,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x88, STATR 0x0
PID:00400002 TID:02F5000A Session End
PID:00400002 TID:02F5000A VBus: Above Session End, below AValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=b02
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()

//////////////////////////////////////////////////////////////////////////////////

PID:00400002 TID:02F5000A +USBOTG::EnterState OtgState=4,
PID:00400002 TID:02F5000A USBOTG::before NewStateAction
PID:00400002 TID:02F5000A +CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG state: 4
PID:00400002 TID:02F5000A -CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG::after NewStateAction
PID:00400002 TID:02F5000A -USBOTG::EnterState
PID:00400002 TID:02F5000A +CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG state: 8
PID:00400002 TID:02F5000A -CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG::EventNotification Current OtgState=8,OtgInnput=0xb02,OtgInternal=0x0
PID:00400002 TID:02F5000A -USBOTG::EventNotification OtgState=8,OtgInnput=0xb02,OtgInternal=0x0
PID:00400002 TID:02F5000A CAM3xxOTG::PollThread(): Polling...
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A +USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A USBOTG::EventNotification: VBUS ERROR entered.
PID:00400002 TID:02F5000A +USBOTG::EnterState OtgState=8,
PID:00400002 TID:02F5000A USBOTG::before NewStateAction
PID:00400002 TID:02F5000A +CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG state: 8
PID:00400002 TID:02F5000A -CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG::after NewStateAction
PID:00400002 TID:02F5000A -USBOTG::EnterState
PID:00400002 TID:02F5000A -USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A CAM3xxOTG::PollThread(): Polling...
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A +USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A USBOTG::EventNotification: VBUS ERROR entered.
PID:00400002 TID:02F5000A +USBOTG::EnterState OtgState=8,
PID:00400002 TID:02F5000A USBOTG::before NewStateAction
PID:00400002 TID:02F5000A +CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG state: 8
PID:00400002 TID:02F5000A -CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG::after NewStateAction
PID:00400002 TID:02F5000A -USBOTG::EnterState
PID:00400002 TID:02F5000A -USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A CAM3xxOTG::PollThread(): Polling...
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A +USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A USBOTG::EventNotification: VBUS ERROR entered.
PID:00400002 TID:02F5000A +USBOTG::EnterState OtgState=8,
PID:00400002 TID:02F5000A USBOTG::before NewStateAction
PID:00400002 TID:02F5000A +CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG state: 8
PID:00400002 TID:02F5000A -CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG::after NewStateAction
PID:00400002 TID:02F5000A -USBOTG::EnterState
PID:00400002 TID:02F5000A -USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A CAM3xxOTG::PollThread(): Polling...
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A +USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A USBOTG::EventNotification: VBUS ERROR entered.
PID:00400002 TID:02F5000A +USBOTG::EnterState OtgState=8,
PID:00400002 TID:02F5000A USBOTG::before NewStateAction
PID:00400002 TID:02F5000A +CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG state: 8
PID:00400002 TID:02F5000A -CAM3xxOTG::NewStateAction()
PID:00400002 TID:02F5000A USBOTG::after NewStateAction
PID:00400002 TID:02F5000A -USBOTG::EnterState
PID:00400002 TID:02F5000A -USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A CAM3xxOTG::PollThread(): Polling...
PID:00400002 TID:02F5000A
+CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A DEVCTL 0x5d, STATR 0x1
PID:00400002 TID:02F5000A Session Valid
PID:00400002 TID:02F5000A 'A' device
PID:00400002 TID:02F5000A VBus: Above VBusValid
PID:00400002 TID:02F5000A CAM3xxOTG::UpdateInput:m_UsbOtgInput.ul=4b82
PID:00400002 TID:02F5000A -CAM3xxOTG::UpdateInput()
PID:00400002 TID:02F5000A +USBOTG::EventNotification OtgState=8,OtgInnput=0x4b82,OtgInternal=0x0
PID:00400002 TID:02F5000A

  • Hi,

    have you modified the code you are using to print out this message? In my BSP source code the message

    printed out in CAM3xxOTG::NewStateAction is as follows and it prints out a meaningful string of the state:

    DEBUGMSG(ZONE_OTG_FUNCTION, (TEXT("USBOTG state: %s\n\r"), g_cppOtgStateString[usbOtgState]));

    I assume this is the same message place you are referring to?

    Looking at entry 8 in g_cppOtgStateString, I see that the state value of 8 equates to  "USBOTG_a_vbus_err".

    This matches the print out in your trace of "PID:00400002 TID:02F5000A USBOTG::EventNotification: VBUS ERROR entered."

    Perhaps look at what your VBUS is doing with regard to voltage levels.

  • Hi, John.

    thanks for your reply.

    This code only modified the printed messages.

    We do some tested on AM335x GP EVM, and found some USB hub dongle will keep get the VBUS error message.

    If we remove the hub, put the device directly connected to the two ports USB of EVM, it passed the test.

    We got 2 of 3 hubs have this issue.

    I think there is something wrong about the CE7 BSP OTG driver.

    But if we hot-plug in/out that hub after the CE desktop shows, issue not exist.

    I will try to check more to see if this issue is the same as our platform.