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.

TM4C1294NCPDT: When executing the function Semaphore_pend(), TI-RTOS will abort

Part Number: TM4C1294NCPDT

For UART driver in TI-RTOS (TM4C1294 platform), when executing the function  Semaphore_pend(), TI-RTOS will abort, why is it?

File: UARTTiva.c

int UARTTiva_write(UART_Handle handle, const void *buffer, size_t size)
{

...

/* If writeMode is blocking, block and get the state. */
if (object->state.writeMode == UART_MODE_BLOCKING) {
/* Pend on semaphore and wait for Hwi to finish. */
if (!Semaphore_pend(Semaphore_handle(&object->writeSem),
object->writeTimeout)) {
/* Semaphore timed out, make the write empty and log the write. */
UARTIntDisable(hwAttrs->baseAddr, UART_INT_TX);
UARTIntClear(hwAttrs->baseAddr, UART_INT_TX);
object->writeCount = 0;

  • Hi,

    I'm running the same uartecho example and I can't see any abort generated due to Semaphore_pend in the UARTTiva.c file.  I'm not sure if you had modified the example. Can you confirm that if you run the stock example as is, it will work for you? See my COM port display. I type in some text and no problem running and I do not encountered any abort.