11 Replies Latest reply on Oct 14, 2012 10:12 PM by blake.ramsdell

    CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()

    joanne.dreitzler

      The SDK 1.2 Release Notes mention CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex().  I cannot find them mentioned anywhere in the documentation or the code.

        • 1. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
          rama.sai.krishna.vakkantula

          You can find the description of these APIs in page number 411 and 412.

             

          Usage is given in USBBulkSourceSink example project.

             

          Regards,

             

          sai krishna.

          • 2. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
            joanne.dreitzler

            The FX3APIGuide.pdf (Revision 1.1) I have has Y_U3P_USB_HOST_EPS_ISO_ORUN_ERROR on page 411 and CY_U3P_USB_HOST_EPS_IOC_INT on page 412.

               

            The USB Event Log stuff is not used in any of the examples supplied with SDK 1.2.

            • 3. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
              joanne.dreitzler

              The Cypress Update Manager does not do a good job installing a new version of the SDK if a previous version is installed.  When I uninstalled the old SDK and reinstall the new one, the pdfs, etc. are updated.

              • 4. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                content.librarian

                I can see that the output is a circurlare buffe. but how to interpret the data in the buffer ?

                   

                Poul-Erik.

                • 5. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                  content.librarian

                  I found the answer in "cyu3usb.h". starting af "CYU3P_USB_LOG_VBUS_OFF".

                     

                  Poul-Erik.

                  • 6. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                    blake.ramsdell

                     Thanks for the info, Poul-Erik.

                       

                     

                       

                    Do you know what the values for CYU3P_USB_LOG_LTSSM_CHG are? My understanding from the comment is that any value over 0x80 is an LTSSM state number. Are these state numbers summarized somewhere? I can see the state machine in the USB 3.0 spec, but there are no numbers for them. I presume Cypress has some mapping of these states to log numbers?

                       

                     

                       

                    I see a lot of log events over 0x80 when running the USBBulkSourceSink example:

                       

                     

                       

                     

                       

                    USB LOG: 6

                       

                    USB LOG: 88

                       

                    USB LOG: 12

                       

                    USB LOG: 89

                       

                    USB LOG: 90

                       

                    USB LOG: 90

                       

                    USB LOG: None

                       

                     

                       

                     

                       

                    USB LOG: 90

                       

                    USB LOG: None

                       

                     

                       

                     

                       

                    USB LOG: None

                       

                    USB LOG: 98

                       

                    USB LOG: 90

                       

                    USB LOG: None

                       

                    USB LOG: None

                       

                    USB LOG: 90

                       

                    USB LOG: None

                       

                     

                       

                     

                       

                     

                       

                    USB LOG: None

                       

                    USB LOG: 98

                       

                    USB LOG: 84

                       

                    USB LOG: 81

                       

                    USB LOG: 11

                       

                    USB LOG: 88

                       

                    USB LOG: 89

                       

                    USB LOG: 8A

                       

                    USB LOG: 90

                       

                    USB LOG: 90

                       

                    USB LOG: None

                       
                            
                    • 7. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                      ghiggi.athos

                       Hi, I'm currently tring to understen how the CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex() functions works.

                         

                      In the cyu3usb I found some of the description related to the hex code present in the buffer (see following list):

                         

                      #define CYU3P_USB_LOG_VBUS_OFF          (0x01)  /* Indicates VBus turned off. */

                         

                      #define CYU3P_USB_LOG_VBUS_ON           (0x02)  /* Indicates VBus turned on. */

                         

                      #define CYU3P_USB_LOG_USB2_PHY_OFF      (0x03)  /* Indicates that the 2.0 PHY has been turned off. */

                         

                      #define CYU3P_USB_LOG_USB3_PHY_OFF      (0x04)  /* Indicates that the 3.0 PHY has been turned off. */

                         

                      #define CYU3P_USB_LOG_USB2_PHY_ON       (0x05)  /* Indicates that the 2.0 PHY has been turned on. */

                         

                      #define CYU3P_USB_LOG_USB3_PHY_ON       (0x06)  /* Indicates that the 3.0 PHY has been turned on. */

                         

                      #define CYU3P_USB_LOG_USBSS_DISCONNECT  (0x10)  /* Indicates that the USB 3.0 link has been disabled. */

                         

                      #define CYU3P_USB_LOG_USBSS_RESET       (0x11)  /* Indicates that a USB 3.0 reset (warm/hot) has happened. */

                         

                      #define CYU3P_USB_LOG_USBSS_CONNECT     (0x12)  /* Indicates that USB 3.0 Rx Termination has been detected. */

                         

                      #define CYU3P_USB_LOG_USBSS_CTRL        (0x14)  /* Indicates that a USB 3.0 control request has been received. */

                         

                      #define CYU3P_USB_LOG_USBSS_STATUS      (0x15)  /* Indicates completion of status stage for a 3.0 control request. */

                         

                      #define CYU3P_USB_LOG_USBSS_ACKSETUP    (0x16)  /* Indicates that the CyU3PUsbAckSetup API has been called. */

                         

                      #define CYU3P_USB_LOG_LGO_U1            (0x21)  /* Indicates that a LGO_U1 command has been received. */

                         

                      #define CYU3P_USB_LOG_LGO_U2            (0x22)  /* Indicates that a LGO_U2 command has been received. */

                         

                      #define CYU3P_USB_LOG_LGO_U3            (0x23)  /* Indicates that a LGO_U3 command has been received. */

                         

                      #define CYU3P_USB_LOG_USB2_SUSP         (0x40)  /* Indicates that a USB 2.0 suspend condition has been detected. */

                         

                      #define CYU3P_USB_LOG_USB2_RESET        (0x41)  /* Indicates that a USB 2.0 bus reset has been detected. */

                         

                      #define CYU3P_USB_LOG_USB2_HSGRANT      (0x42)  /* Indicates that the USB High-Speed handshake has been completed. */

                         

                      #define CYU3P_USB_LOG_USB2_CTRL         (0x44)  /* Indicates that a FS/HS control request has been received. */

                         

                      #define CYU3P_USB_LOG_USB2_STATUS       (0x45)  /* Indicates completion of status stage for a FS/HS control transfer. */

                         

                      #define CYU3P_USB_LOG_USB_FALLBACK      (0x50)  /* Indicates that the USB connection is dropping from 3.0 to 2.0 */

                         

                      #define CYU3P_USB_LOG_USBSS_ENABLE      (0x51)  /* Indicates that a USB 3.0 connection is being attempted again. */

                         

                      #define CYU3P_USB_LOG_USBSS_LNKERR      (0x52)  /* The number of link errors has crossed the threshold. */

                         

                      #define CYU3P_USB_LOG_LTSSM_CHG         (0x80)  /* Base of values that indicate a USB 3.0 LTSSM state change. */

                         

                       

                         

                       

                         

                      but his list not contain all the hex code has is shown in the following log make by me:

                         

                      0x89:  ??? 

                         
                          0x8a:  ???    
                         
                          0x8b:  ???    
                         
                          0x90:  ???    
                         
                          0x98:  ???    
                         
                          0x84:  ???    
                         
                          0x81:  ???    
                         
                          0x11:  Indicates that a USB 3.0 reset warmhot) has happened.     
                         
                          0x88:  ???    
                         
                          0x89:  ???    
                         
                          0x8a:  ???    
                         
                          0x8b:  ???    
                         
                          0x90:  ???    
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x90:  ???    
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x15:  Indicates completion of status stage for a 3.0 control request.     
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x15:  Indicates completion of status stage for a 3.0 control request.     
                         
                          0x91:  ???    
                         
                          0x92:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x15:  Indicates completion of status stage for a 3.0 control request.     
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x15:  Indicates completion of status stage for a 3.0 control request.     
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x15:  Indicates completion of status stage for a 3.0 control request.     
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x16:  Indicates that the CyU3PUsbAckSetup API has been called.     
                         
                          0x15:  Indicates completion of status stage for a 3.0 control request.     
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                          0x14:  Indicates that a USB 3.0 control request has been received.     
                         
                          0x91:  ???    
                         
                          0x98:  ???    
                         
                          0x90:  ???    
                         
                              
                         
                          where can I find such missin codes?   
                         
                          Thanks in advance    
                         
                          Athos   
                      • 8. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                        joel.brenner
                                I would like too having some more details about events coded with numbers above 0x80. Since they are reported a minimum of explanation is mandatory in my opinion. Would it be possible that somebody from Cypress adds some comments about the events not listed in cyu3usb.h but reported by the EventLogger ? Thanks in advance, JoeBre   
                        • 9. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                          robert.kliemann

                          Yes, I'd also appreciate to have a complete documentation about the USB-logs. Without having this the logs are a quite senseless.

                             

                           

                             

                          Thanks!

                          • 10. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                            kumr

                            Log values from 0x80 onwards represent the LTSSM state that the device went through. You need to subtract 0x80 from the log values and then interpret them as given in the attached spreadsheet. They are basically in the order specified in the USB 3 spec.

                            • 11. Re: CyU3PUsbInitEventLog() and CyU3PUsbGetEventLogIndex()
                              ghiggi.athos
                                      Thanks for the information,very useful the excel file.