工具/软件:Code Composer Studio
我在 CC3200 Launchpad 上使用2个 UART 、一个用于终端 、 另一个用于其他设备。 我要附加 UART_IF.c、uart_if.h common.h 和 pinmux.c 文件。 我无法使用 UART 数据、也无法在 Tera Term 上打印。 请在 issue.e2e.ti.com/.../6886.uart_5F00_if.h 上为我提供帮助
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:Code Composer Studio
我在 CC3200 Launchpad 上使用2个 UART 、一个用于终端 、 另一个用于其他设备。 我要附加 UART_IF.c、uart_if.h common.h 和 pinmux.c 文件。 我无法使用 UART 数据、也无法在 Tera Term 上打印。 请在 issue.e2e.ti.com/.../6886.uart_5F00_if.h 上为我提供帮助
e2e.ti.com/.../4331.pinmux.ce2e.ti.com/.../7411.uart_5F00_if.ce2e.ti.com/.../1856.common.hThanks以供答复。 否...我手动更改了 MQTT 客户端示例的 pinmux.c、因为只 添加了 UART1。 我将重新发送 pinmucx.c 和其余文件。
这就是我在与 UART 相关的 main.c 中的内容。
#ifndef NOTERM
#include "UART_IF.h"
#endif
#define console UARTA0_BASE
#define CONSOLE1 UARTA1_BASE
#define UartGetChar() MAP_UARTCharGet (控制台)
#define UartPutChar (c) map_UARTCharPut (console、c)
#define UartGetChar1 () MAP_UARTCharGet (CONSOLE1)
#define UartPutChar1 (c) MAP_UARTCharPut (CONSOLE1、c)
您好、Chintayee、
在 Init_term 函数中、您是否配置了第二个 UART?
如果您使用 UART0,请按如下方式执行操作。 对于 UART1、只需将 UART0替换为 UART1。
uartHandle = UART_OPEN (Board_UART1、uartParams);
/*从 LPDS 依赖项中删除 UART 接收*/
UART_CONTROL (uartHandle、UART_CMD_RXDISABLE、空);
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readMode = UART_MODE_CALLACK;
uartParams.readCallback = UART_Data_Rx_Callback;
uartParams.writeMode = UART_MODE_CALLBACK;
uartParams.writeCallback = UART_Data_Tx_Callback;
uartParams.readReturnMode = UART_return_full;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.baudrate = 115200;
UART_DATA_Handle = UART_OPEN (Board_UART0、&uartParams);
此致、
Pranav