你好,
您使用的是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);
}
}
你好,
您使用的是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);
}
}
举报