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.

关于TI-RTOS下RS485的使用,板子是TMDSIDK574

我使用的SDK是processor_sdk_rtos_am57xx_6_03_00_106。我想要在IDK574x板子上面使用RS485通信。但是我并没有找到相关的程序。我尝试使用UART_open()进行编程。它没有用。程序如下。当我将UART_socGetInitCfg、UART_socSetInitCfg、UART_open索引值idx改为2的时候,我可以使用XDS100V2的 UART发送数据。
UART_init();
UART_HwAttrs uart_cfg;

/* Get the default UART init configurations */
UART_socGetInitCfg(3, &uart_cfg);
uart_cfg.edmaHandle = NULL;
uart_cfg.dmaMode = FALSE;
uart_cfg.loopback = FALSE;
/* Set the DMA enabled UART init configurations */
UART_socSetInitCfg(3, &uart_cfg);

char testIdPrompt[16] = "\r\n UART UT ";
UART_PAR uartParity = UART_PAR_NONE;
UART_Handle uart = NULL;
UART_Params uartParams;
UART_Params_init(&uartParams);
uartParams.parityType = uartParity;
uart = UART_open(3, &uartParams);

for(int i=0;i<5;i++){
UART_write(uart, (void *)(uintptr_t)testIdPrompt, sizeof(testIdPrompt));
}
UART_printf("success.\n");
UART_close(uart);
我不知道使用RS485是否还有其他编程方法。