Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hi experts,
I am using motor_control_sdk_am243x_09_02_00_09, CCS 12.6, SysConfig 1.21.1.
I am trying to understand the uart_echo_dma_lld example, and made a slight modification where I am sending two strings at the beginning:
/* Send entry string */
gNumBytesWritten = 0U;
trans.buf = &gUartBuffer[0U];
strncpy(trans.buf,"This is uart echo test blocking mode\r\nReceives 8 characters then echo's back. Please input..\r\n", APP_UART_BUFSIZE);
trans.count = strlen(trans.buf);
CacheP_wb((void *)trans.buf, trans.count, CacheP_TYPE_ALL);
transferOK = UART_lld_writeDma(gUartHandleLld[CONFIG_UART_CONSOLE], trans.buf, trans.count, NULL);while(try_lock_mutex(gUartObject[CONFIG_UART_CONSOLE].writeTransferMutex) == MUTEX_ARM_LOCKED);
APP_UART_ASSERT_ON_FAILURE(transferOK, trans);
// TEST
/* Send entry string */
gNumBytesWritten = 0U;
trans.buf = &gUartBuffer[0U];
strncpy(trans.buf,"please enter 8 chars -->\r\n", APP_UART_BUFSIZE);
trans.count = strlen(trans.buf);
CacheP_wb((void *)trans.buf, trans.count, CacheP_TYPE_ALL);
transferOK = UART_lld_writeDma(gUartHandleLld[CONFIG_UART_CONSOLE], trans.buf, trans.count, NULL);while(try_lock_mutex(gUartObject[CONFIG_UART_CONSOLE].writeTransferMutex) == MUTEX_ARM_LOCKED);
APP_UART_ASSERT_ON_FAILURE(transferOK, trans);
// TEST
I supposed that the try_lock_mutex() would make the program wait until the string was sent. But the result in the UART terminal is
This is uart echo test blocking mode<\r><\n>
Receives 8 characterplease enter 8 chars --><\r><\n>
...the first string seems to be cut.
If I set debugging breeakpoints on the UART_lld_writeDma() instructions, then the strings are complete.
What am I doing wrong?
uart_echo_dma_lld_am243x-evm_r5fss0-0_nortos_ti-arm-clang.zip
BR
Alexander