5 Replies Latest reply on Sep 4, 2020 4:44 AM by YashwantK_46

    FX3 UVC application AN75779: Not able to get UART debug log

    KiGo_4722766

      I'm using FX3 with FPGA instead of Image sensor. To debug some issue, I am trying to get UART logs, but not able to.

      Any pointer that would help.

        • 1. Re: FX3 UVC application AN75779: Not able to get UART debug log
          YashwantK_46

          Hello,

           

          "To debug some issue, I am trying to get UART logs, but not able to."

          => Can you please let me know if you have enabled the USB_DEBUG_INTERFACE or DEBUG_PRINT_FRAME_COUNT?

           

          Can you please let me know if you are using the on-board UART debugger or an external UART debugger?

           

          Have you made any changes to the CyU3PDeviceConfigureIOMatrix (&io_cfg); structure?

           

          Have you added any debug logs yourself or are you trying the default example as it is?


          Please share your firmware, if you have made any changes to it, for me to review it on my end.

           

          Regards,
          Yashwant

          • 2. Re: FX3 UVC application AN75779: Not able to get UART debug log
            KiGo_4722766

            Hello,

             

            Can you please let me know if you have enabled the USB_DEBUG_INTERFACE or DEBUG_PRINT_FRAME_COUNT?

            >> I've enabled DEBUG_PRINT_FRAME_COUNT to get if frames are coming or not.

             

            Can you please let me know if you are using the on-board UART debugger or an external UART debugger?

            >> I'm using on-board UART debugger

             

            Have you made any changes to the CyU3PDeviceConfigureIOMatrix (&io_cfg); structure?

            >> I'm using slightly modified "an75779". No changes in structure. Below it is:

            /* Configure the IO matrix for the device. */

                io_cfg.isDQ32Bit        = CyTrue;

                io_cfg.s0Mode           = CyFalse;

                io_cfg.s1Mode            = CyFalse;

                io_cfg.lppMode          = CY_U3P_IO_MATRIX_LPP_DEFAULT;

                io_cfg.gpioSimpleEn[0]  = 0;

                io_cfg.gpioSimpleEn[1]  = 0;

                io_cfg.gpioComplexEn[0] = 0;

                io_cfg.gpioComplexEn[1] = 0;

                io_cfg.useUart          = CyTrue;   /* Uart is enabled for logging. */

                io_cfg.useI2C           = CyTrue;   /* I2C is used for the sensor interface. */

                io_cfg.useI2S           = CyFalse;

                io_cfg.useSpi           = CyFalse;

             

             

            Have you added any debug logs yourself or are you trying the default example as it is?

            >> I'm not getting any output in video stream so wanted to debug if frames are coming or not. So enabled DEBUG_PRINT_FRAME_COUNT and checked serial output on putty on UART port.


            Please share your firmware, if you have made any changes to it, for me to review it on my end.

            >> Original reference design I'm using has 32 bit data lines, I made changes for 16 bit data lines in GPIF design. Attaching the firmware.

            • 3. Re: FX3 UVC application AN75779: Not able to get UART debug log
              YashwantK_46

              Hello,

               

              Apologies for the delayed response.

               

              " Original reference design I'm using has 32 bit data lines, I made changes for 16 bit data lines in GPIF design. Attaching the firmware."

              => From this i understand that you have made the GPIF bus width as 16-bit and might not have updated the counters based on the bus width being used.

              Please refer to section 3.5 GPIF II State Machine of the AN75779 app note which explains the formula for updating the LD_ADDR_COUNT and LD_DATA_COUNT actions in the GPIF II state machine as below:

               

              "I'm not getting any output in video stream so wanted to debug if frames are coming or not. So enabled DEBUG_PRINT_FRAME_COUNT and checked serial output on putty on UART port."

              => Can you checking for the same on Tera Term application and share the screenshot of the prints.

               

              Also, can you please try the steps mentioned in this KBA: FX3: CyU3PDebugPrint Not Printing UART Debug Message - KBA229813 ?

               

              Regards,
              Yashwant

              • 4. Re: FX3 UVC application AN75779: Not able to get UART debug log
                KiGo_4722766

                - I had updated GPIF bus width to 16 and proper LD_ADDR_COUNT & LD_DATA_COUNT.

                - I tried with tera term and no output on that, no meaning of sharing blank snapshot

                - I tried possible steps from KBA229813, my UART is connected to GPIO 53-56, so I made changes accordingly, no luck.

                 

                Actual issue is like, I'm getting UVC video output on USB3 interface but some of the frames are dropping, not sure at fx3 side or from origin, so wanted to debug that.

                • 5. Re: FX3 UVC application AN75779: Not able to get UART debug log
                  YashwantK_46

                  Hello,

                   

                  Can you please try any of the default firmware provided in the SDK to see if the UART is outputting any data or not?
                  You can try using USBBulkSrcSink firmware from the path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink

                   

                  Do connect the UART port to PC before programming FX3 and share the snapshot of the Tera Term window.


                  Regards,

                  Yashwant