Other Parts Discussed in Thread: SYSCONFIG
This is a follow up to this question.
I was able to use SysConfig to create a new UART instance:
/*
* UART
*/
/*
* UART
*/
#include <drivers/uart.h>
/* UART Instance Macros */
#define CONFIG_UART0 (0U)
#define CONFIG_UART1 (1U)
#define CONFIG_UART_NUM_INSTANCES (2U)
#define CONFIG_UART_NUM_DMA_INSTANCES (0U)
/* UART Driver handles */
UART_Handle gUartHandle[CONFIG_UART_NUM_INSTANCES];
/* UART Driver Parameters */
UART_Params gUartParams[CONFIG_UART_NUM_INSTANCES] =
{
{
.baudRate = 115200,
.dataLength = UART_LEN_8,
.stopBits = UART_STOPBITS_1,
.parityType = UART_PARITY_NONE,
.readMode = UART_TRANSFER_MODE_BLOCKING,
.writeMode = UART_TRANSFER_MODE_BLOCKING,
.readCallbackFxn = NULL,
.writeCallbackFxn = NULL,
.transferMode = UART_CONFIG_MODE_POLLED,
.intrNum = 78U,
.intrPriority = 4U,
.edmaInst = 0xFFFFFFFFU,
.rxEvtNum = 34U,
.txEvtNum = 35U,
},
{
.baudRate = 115200,
.dataLength = UART_LEN_8,
.stopBits = UART_STOPBITS_1,
.parityType = UART_PARITY_NONE,
.readMode = UART_TRANSFER_MODE_BLOCKING,
.writeMode = UART_TRANSFER_MODE_BLOCKING,
.readCallbackFxn = NULL,
.writeCallbackFxn = NULL,
.transferMode = UART_CONFIG_MODE_POLLED,
.intrNum = 24U,
.intrPriority = 4U,
.edmaInst = 0xFFFFFFFFU,
.rxEvtNum = 4U,
.txEvtNum = 5U,
},
};
But now the CLI hangs when the other serial port starts transmitting data. The task priorities are as follows:
#define TLV_TASK_PRI (3U) #define CLI_TASK_PRIORITY (2U)
This priority distribution causes the CLI on ttyACM2 to hang and not accept any more commands.
When I change it to:
#define TLV_TASK_PRI (3U) #define CLI_TASK_PRIORITY (3U) OR #define TLV_TASK_PRI (2U) #define CLI_TASK_PRIORITY (3U)
both configurations then cause ttyACM3 to hang and not transmit the TLVs...
Am I missing something? Is it a baud rate issue? Or something else?
Note: I've also changed the TLV uart:
void mmwDemo_TransmitProcessedOutputTask()
{
UART_Handle uartHandle = gMmwMssMCB.loggingUartHandle;
...
if(gUartParams[1].baudRate == 115200)
{
txUartus = header.totalPacketLen * TIME_TO_SEND_1BYTE_DATA_WITH_BAUDRATE_115200_us;
}
#ifdef ENABLE_UART_HIGH_BAUD_RATE_DYNAMIC_CFG
else if(gUartParams[1].baudRate == 1250000)
{
txUartus = header.totalPacketLen * TIME_TO_SEND_1BYTE_DATA_WITH_BAUDRATE_1250000_us;
}
#endif
...
}
void mmwave_demo(void* args)
{
...
gMmwMssMCB.commandUartHandle = gUartHandle[0];
gMmwMssMCB.loggingUartHandle = gUartHandle[1];
...
}