Cypress技术william hill官网
直播中

刘斯宁

7年用户 176经验值
私信 关注
[问答]

Fx3 Uart调试打印错误

嗨,伙计们,
我试图用UVCVideoClass例子来获得在FX3上的UART调试工作。
不幸的是,我只能在控制台上得到垃圾:
在我的串行控制台中,不是预期的“应用程序启动rn”,而是在我的串行控制台中得到“~(y)y=57”(i=115200—8n-1),我只提到这一点,因为当波特率没有被设置时,我已经看到了类似的错误。
这发生在每一个CYU3pDebug打印上。
我的UART配置:
UARTCONtiON.BUDERATE = CyuU3PUAtgBaUrrAtdia115200;UARTCONTION.BUARTHORYONE STORITHOBIT;UARTCONTION.QUICE=CyuU3PUUARTHONIONQUITY;UARTCONTION.TXFULL = CyTrand;UARTCONTRO.RXFUNID= CYFLUE;UARTCONFIL.FROCCTRL = CyFLUE;UARTCONTION.ISDMA = CyTalm;可能有人请指点我。T方向?格雷兹,克里斯

以上来自于百度翻译


     以下为原文
  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 Startedrn" 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

回帖(9)

王建华

2019-1-24 11:41:34
你好,
您使用的是UARTR和DMA。也许你可以发布init的DMA到。
例如
无效
DebugInit(空)
{
CYU3PUARTCONTICONTUT UARTCONFIG;
CYU3PRESTROSTATUS SWT APIRTYSTATION CYU-U3PY成功;
/*初始化UART以打印调试消息*/
ApIdReStase= Cuu3PuARTITIN();
如果(ApRestStand)!= CYU-U3PY成功
{
EasPrPrRoad(ApRestStand);
}
/*设置UART配置*/
UARTCONTUR.BUDERATE = CYU-U3PUUARTH BAUDRATET11500;
UARTCONTION STOBIT = CYU-U3PUUARTHONEONI STORYBIT;
UARTCONTION =奇偶= CYU-U3PUUARTHONNOY奇偶校验;
UARTCONT.TXNET= CyTrand;
UARTCONTRO.RXPENTITY = CyFLUE;
UARTCONTIONFROCCTRL = CyFLUE;
UARTCONDS.ISDMA=CyTrand;
*设置UART配置*/
ApItReStase= CUU3PUARTSETCONFIG(&;UARTCONFIG,NULL);
如果(ApRestStand)!= CYU-U3PY成功
{
EasPrPrRoad(ApRestStand);
}
*设置UART传输*/
ApItReStase= CUU3PUARTTXStBaseBuffFER(0xFFFFFFFF);
如果(ApRestStand)!= CYU-U3PY成功
{
EasPrPrRoad(ApRestStand);
}
/*初始化调试应用程序*/
ApItReStase= Cyu3pDeBuffIT(CyuU3PL LpppSokkul-UARTARK CONS,8);
如果(ApRestStand)!= CYU-U3PY成功
{
EasPrPrRoad(ApRestStand);
}
}

以上来自于百度翻译


     以下为原文
   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);
        }
    }
            
举报

王建华

2019-1-24 11:57:25
并且可以检查是否使用正确的UART端口。你使用的是哪种芯片(FX3)?你使用开发板吗?
当做,
隆皮

以上来自于百度翻译


     以下为原文
  and may be check if you are using correct UART port. Which chip are you using (FX3)? Are you using development board?
    regards,
    lumpi 
举报

刘斯宁

2019-1-24 12:03:19
嗨,LuPI6,
谢谢你的快速回复。
我的DebugInit和你的长得很像。我也尝试过波特率降低-没有任何运气。
不幸的是,它不是CyPress DEV板(并且我在板上没有文档,至少还没有)。它有一个CYUSB3014 BZX芯片。
我使用一个FTDI USB串行电缆只有GND和TX附加。
格雷茨
克里斯

以上来自于百度翻译


     以下为原文
  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
举报

王建华

2019-1-24 12:09:44
你好,
你用示波器测量信号检查波特率以及电压等级?
是FTDI UART的水平支撑或需要FTDI对称水平像RS-232?
检查这些,可能会有一个配置FTDI与你的环境工作。
当做,
隆皮

以上来自于百度翻译


     以下为原文
   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
举报

更多回帖

发帖
×
20
完善资料,
赚取积分