- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I am trying to get UART debugging working on the FX3 with the UVCVideoClass example.
Unfortunately I only get garbage in my console:
Instead of the expected "App Started\r\n" I get "~_��y��} �Y = 57��" in my serial console (Which is set to 115200-8-N-1 - I only mention this because I have seen similar errors when the baudrate is not set up propperly).
This happens with every CyU3PDebugPrint.
My uart config:
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; May someone please point me in the right direction?
Greetz, Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you are using uartr with dma. May be you can post the init for DMA to.
e. g.
void
DebugInit (void)
{
CyU3PUartConfig_t uartConfig;
CyU3PReturnStatus_t apiRetStatus = CY_U3P_SUCCESS;
/* Initialize the UART for printing debug messages */
apiRetStatus = CyU3PUartInit();
if (apiRetStatus != CY_U3P_SUCCESS)
{
esAppErrorHandler(apiRetStatus);
}
/* Set UART Configuration */
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;
/* Set the UART configuration */
apiRetStatus = CyU3PUartSetConfig (&uartConfig, NULL);
if (apiRetStatus != CY_U3P_SUCCESS)
{
esAppErrorHandler(apiRetStatus);
}
/* Set the UART transfer */
apiRetStatus = CyU3PUartTxSetBlockXfer (0xFFFFFFFF);
if (apiRetStatus != CY_U3P_SUCCESS)
{
esAppErrorHandler(apiRetStatus);
}
/* Initialize the debug application */
apiRetStatus = CyU3PDebugInit (CY_U3P_LPP_SOCKET_UART_CONS, 8);
if (apiRetStatus != CY_U3P_SUCCESS)
{
esAppErrorHandler(apiRetStatus);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
and may be check if you are using correct UART port. Which chip are you using (FX3)? Are you using development board?
regards,
lumpi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lumpi6,
Thank you for your quick reply.
My DebugInit looks exactly like yours. I also tried with lower baud rates - without any luck.
Unfortunately it is not the cypress dev board (and I have no documentation on the board, at least not yet). It has a CyUSB3014-BZX chip.
I use a FTDI USB serial cable with only GND and TX attached.
Greetz,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
did you measure the signal with the oscilloscope and checked the baudrate as well as the voltage level?
Is the FTDI supporting the UART levels or needs the FTDI symmetric levels like RS-232?
check these and may be there is a configuration in FTDI to work with your environment.
regards,
lumpi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris,
Specifying the baud rate and other port parameters in the serial console application usually overrides the default port settings specified for the device in Device Manager.
However sometimes, OS takes the default port setting values mentioned for the device in the device manager. Identify your device in the device manger, right click and choose properties. Change the port settings to appropriate baud rate. now try launching the serial console application with the same port configuration.
Hope this helps.
Regards
Mudabir Kabir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get this problem too, see: http://www.cypress.com/?app=forum&id=167&rID=93181
Unfortunately I have no fix yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See my post for my fix (ish)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After checking with the oscilloscope I saw that it was RS232 and not TTL as I was expecting.
So thanks again to Lumpi6 for pointing me in the right direction and thanks to all taking interest in my problem
Greetz,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had similar problems when i was using CyU3PDebugPrint function to print bytes. I was using 0x%02X for format. Changing it to 0x%X helped me. I didn't notice that CyU3PDebugPrint function couldn't be used with precision.