13 Replies Latest reply on Jul 27, 2019 8:13 PM by NoriakiT_91

    fx3 uart

    gean_3054931

      Hello,

      I am trying to print uart messages from fx3 to pc.I am using tx,rx and gnd pins.Pc tx is connected to fx3 rx and fx3 tx is connected pc rx(rs232->usb connector).

          uartConfig.baudRate = CY_U3P_UART_BAUDRATE_115200;

          uartConfig.stopBit = CY_U3P_UART_ONE_STOP_BIT;

          uartConfig.parity = CY_U3P_UART_NO_PARITY;

          uartConfig.txEnable = CyTrue;

          uartConfig.rxEnable = CyFalse;

          uartConfig.flowCtrl = CyFalse;

          uartConfig.isDma = CyTrue;

      Above parametres defined in fx3 and pc both are same.

      For this message, CyU3PDebugPrint (4, "CyU3PDmaChannelCommitBuffer failed, Error code = %d\n", status);

      data is printing on teraterm,but data is in other format not as in CyU3PDebugPrint .

       

      thank you.

        • 1. Re: fx3 uart
          NoriakiT_91

          Please refer this Knowledge-Base Article.

           

          Use of CyU3PDebugPreamble() API – KBA227492

           

          Regards,

          Noriaki

          • 2. Re: fx3 uart
            gean_3054931

            Hello,

            extern void

            CyU3PDebugPreamble (

                    CyBool_t sendPreamble    /**< CyFalse: Do not send preamble; CyTrue: Send preamble. */

                    );

             

            afetr making CyU3PDebugPreamble (CyFalse); problem is same.

            data is printing on teraterm,but data is in other format not as in CyU3PDebugPrint .

             

            thank you,

            geetha

            • 3. Re: fx3 uart
              RashiV_61

              Hi Geetha,

               

              Can you share the snippet for the output you are getting on teraterm

               

              Regards,

              Rashi

              • 4. Re: fx3 uart
                gean_3054931

                Hi Rashi,

                please look for an attachment that containing teraterm data.

                thank you.@ !

                • 5. Re: fx3 uart
                  RashiV_61

                  Hi Geetha,

                   

                  Can you share the firmware you are working on as the logs are not enough to get the exact problem.

                   

                  Regards,

                  Rashi

                  • 6. Re: fx3 uart
                    gean_3054931

                    Hi ,

                    firmware is attached.

                    thank you.

                    • 7. Re: fx3 uart
                      RashiV_61

                      Hello Geetha,

                       

                      - As per the firmware, you are using 16-bit configuration in DEFAULT lpp mode that means pins (46:49) are used as UART.

                        Check that the pins are properly connected.

                      - And if you are using the integrated debugger, pins (53:56) are connected to the com port and cannot be used for SPI (as in your firmware).

                        For 16-bit lpp mode should be changed to UART_ONLY.

                      - For using CyU3PDebugLog() API please refer to FX3 API Guide. It seems the parameters passed  are not proper.

                      - CyU3PDebugPreamble should be added in CyfxdebugInit() function block only.

                       

                      Regards,

                      Rashi

                      • 8. Re: fx3 uart
                        gean_3054931

                        Hello,

                        As per the firmware, you are using 16-bit configuration in DEFAULT lpp mode that means pins (46:49) are used as UART.

                          Check that the pins are properly connected.

                        -->I am using 16 bit configuration with CY_U3P_IO_MATRIX_LPP_DEFAULT,I am using only UART_TX (48) and UART_RX (49).I am not using pin no 46 and 47.pins (48:49) are connected to the com port.

                         

                        What you mean by integrated debugger?

                         

                        I added CyU3PDebugPreamble  in CyfxdebugInit() function block .

                        after making 16-bit lpp mode to UART_ONLY,endpoints are not enumerating.

                        please look for an attached firmware.

                         

                        thanks.

                        • 9. Re: fx3 uart
                          RashiV_61

                          Hi Geetha,

                           

                          - If you are using pins (48:49) for UART, you need to use lpp mode as DEFAULT for 16-bit configuration. Please refer to the attachment.

                          - Integrated debugger is in reference to usb serial port on the FX3 explorer kit.

                          - I checked the firmware you shared. Its working fine at my end.

                          - The CyU3PDebugLog() api is probably causing the garbage uart prints. The parameters passed to the API are not proper. Please refer to the API details for that.

                           

                           

                          Regards,

                          Rashi

                          • 10. Re: fx3 uart
                            gean_3054931

                            Hi Rashi,

                            I am using pin 48 and 49,with CY_U3P_IO_MATRIX_LPP_DEFAULT.I am using serial to usb converter.

                            without calling API CyU3PDebugLog() also,I am able to print(not in the correct format) data in teraterm using CyU3PDebugPrint () API.

                            Can you tell me the correct parameters to be sent to CyU3PDebugLog() ?

                             

                            regards,

                            geetha.

                             

                             

                            • 11. Re: fx3 uart
                              RashiV_61

                              Hi Geetha,

                               

                              I don't see any issue with the firmware that you have shared in previous response . It is working fine for me. There can be issue with hardware. Can you share schematics of your project.

                               

                              For using CyU3PDebugLog() you can refer to the FX3API file in the SDK.

                               

                              You can also refer to the C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxusbdebug firmware

                               

                              Here is snippet from cyfxusbdebug firmware

                              snipp.PNG

                              • 12. Re: fx3 uart
                                gean_3054931

                                Hi,

                                please look for schematic attached.

                                K7 connector is connected to RS-232 db9 pin.

                                RX-TX

                                TX-RX

                                GND-GND

                                I am using uart to usb serial conveter.

                                 

                                thank you.

                                • 13. Re: fx3 uart
                                  NoriakiT_91

                                  The signal level of the RS-232C DB9 connector is a typical +/-12V.  So, if the signal is connected to an FX3, the FX3 will be damaged.

                                  If you want to connect your FX3 to the RS-232C DB9 connector, a level shifter external hardware is required.  Please refer following schematic which was used in the old FX3 DVK kit CYUSB3KIT-001.

                                  GS004383.png

                                   

                                  Regards,

                                  Noriaki