cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

gean_3054931
Contributor II

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.

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator

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

Regards,
Rashi

View solution in original post

0 Likes
13 Replies
NoriakiT_91
Employee

Please refer this Knowledge-Base Article.

Use of CyU3PDebugPreamble() API – KBA227492

Regards,

Noriaki

0 Likes
gean_3054931
Contributor II

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

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hi Geetha,

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

Regards,

Rashi

Regards,
Rashi
0 Likes
gean_3054931
Contributor II

Hi Rashi,

please look for an attachment that containing teraterm data.

thank you.@ !

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hi Geetha,

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

Regards,

Rashi

Regards,
Rashi
0 Likes
gean_3054931
Contributor II

Hi ,

firmware is attached.

thank you.

0 Likes
Rashi_Vatsa
Moderator
Moderator

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

Regards,
Rashi

View solution in original post

0 Likes
gean_3054931
Contributor II

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.

0 Likes
Rashi_Vatsa
Moderator
Moderator

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

Regards,
Rashi
0 Likes
gean_3054931
Contributor II

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.

0 Likes
Rashi_Vatsa
Moderator
Moderator

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

Regards,
Rashi
0 Likes
gean_3054931
Contributor II

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.

0 Likes
NoriakiT_91
Employee

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

0 Likes