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 UART Callback mode and FIFO overflow

Other Parts Discussed in Thread: TM4C1233H6PM, SYSBIOS

TM4C1233H6PM Tiva processor

Custom Board using a combination battery & usb for power.

System clock is 80MHz on external oscillator.

TI-RTOS version tirtos_tivac_2_01_00_03.

The project I am working on uses UART 1 connected to an external bluetooth module. The UART is configured for 8, none and 1 and at a baud of 1382400.

During setup the uart interface is used in its standard blocking mode and data frames are received and sent normally. After initialization the uart is put into callback mode. This is done to free up the task that called UART_read to enable it to handle other events and or messages instead of waiting forever or timing out waiting for data to arrive.

My understanding of the callback mode is you can call UART_read in that mode to allow the calling task to perform other actions and not be forced to wait for data to arrive before proceeding further. So, when data does arrive on the UART the callback is called and it should then be treated like any other ISR (or this case Hwi) and notify the interested parties (aka Event driven process).

The problem occurs when frames larger then 16 bytes arrives. The FIFO overflows and the remaining of the frame is lost.

The protocol we are using sends the frame length in the third byte of the frame and the protocol has beginning and terminating bytes so we know when the frame starts, how long and where it ends.

Below is the code that is being used:

uint32_t uiRemainder_frame_rcv_len = 0;

void vIneedMD_radio_read_cb(UART_Handle sHandle, void *buf, int count)
{
//  tRadio_request tParams;
  ERROR_CODE eEC = ER_FAIL;
  tRadio_message tRadio_msg;
  int i = 0;
  int iBuff_Index = 0;
  uint32_t uiRcv = 0;
  uint8_t * c = (uint8_t * )buf;

  if(count == 3)
  {
    if(c[0] == INEEDMD_CMND_SOF)
    {
      //Protocol frame
      //

      eRadio_Message_Params_Init(&tRadio_msg);

      uiRemainder_frame_rcv_len = c[2] - 3;
      tRadio_msg.uiFrame_len = c[2];
      memcpy(tRadio_msg.uiBuff, c, c[2]);
      tRadio_msg.eMessage = RADIO_MSG_RCV_PROTOCOL_FRAME;
      Mailbox_post(tTIRTOS_Radio_mailbox, &tRadio_msg, BIOS_NO_WAIT);
    }

    return;
  }
  else if(count == uiRemainder_frame_rcv_len)
  {
    tRadio_msg.uiFrame_len = count;
    uiRemainder_frame_rcv_len = 0;
    memcpy(tRadio_msg.uiBuff, c, count);
    tRadio_msg.eMessage = RADIO_MSG_FINISH_RCV_PROTOCOL_FRAME;
    Mailbox_post(tTIRTOS_Radio_mailbox, &tRadio_msg, BIOS_NO_WAIT);
  }
  else
  {
    return;
  }
}


void vRadio_task(UArg a0, UArg a1)
{

  ERROR_CODE eEC = ER_FAIL;

  eRadio_connection_state eConn_State;
  tRadio_message tRadio_Message;
  uint16_t uiRcvd_str_len = 0;
  int i = 0;
  uint8_t cRcv_frame[128];

  eIneedMD_radio_setup();


  eRadio_Message_Params_Init(&tRadio_Message);

  UART_read(sRadio_UART_handle, cRcv_frame, 3);

  while(1)
  {
    if(Mailbox_pend(tTIRTOS_Radio_mailbox, &tRadio_Message, BIOS_WAIT_FOREVER) == true)
    {
      switch(tRadio_Message.eMessage)
      {
        case RADIO_MSG_RCV_PROTOCOL_FRAME://RADIO_REQUEST_RECEIVE_PROTOCOL_FRAME:
          UART_read(sRadio_UART_handle, &cRcv_frame[3], (tRadio_Message.uiFrame_len - 3));
          break;
        
        case RADIO_MSG_FINISH_RCV_PROTOCOL_FRAME:
          if((cRcv_frame[0] == PROTOCOL_SOF) & \
             (cRcv_frame[tRadio_msg.uiFrame_len + 3] == PROTOCOL_EOF))
          {
            //do something
          }
          
          //begin another uart read to for the next frame
          UART_read(sRadio_UART_handle, cRcv_frame, 3);
          break;

        default:
          break;
      }
    }
  }
}

You will have to excuse me if the snippit has some errors in it, I tried to abstract the parts of the code that were not relevant to this issue and may have miss typed a variable name or function.

In any case the code works as expected with small frames (ie < 16 bytes) but once the frames are "large" the uart callback function never gets called for the remainder of the frame therefore the event is never completed. According to the UART1 registers the UART overrun flag is set and data was lost.

Is there something I am missing in my code when it comes to using uart callback mode?

I am trying to avoid polling the uart (IE doing a uart read and if no data was received do a read again, NOT the rtos uart polling function)because that defeats the purpose of the event driven process. This also can cause lag in the system while the task that called uart_read() can't respond to messages while waiting for the uart to timeout.

Thanks in advance.

  • Hiii am sekhar am also facing same issue while receiving data more than  15 bytes .how can i resolve this issue anybody can help me.Task scheduling also not working i was created two tasks with different priority but while executing the project first it was enter into first task after it was switch into the second task after it was in second task only continuously if i use Task_sleep() or Task_yield() that time its working fine can you tell me is  there any other mechanism to schedule tasks effectively. 

  • Matt,

    In your callback, you can call the UART_read(). This will mimize the delay to prevent overflow. Note that Mailbox is copied based, so you can reuse the buffer in the callback once the Mailbox_post is done or have multiple buffers and manage them accordingly.

    Todd

  • Sekhar,

    TI-RTOS has a pre-emptive kernel, so if a higher priority task is running, it keeps the processor until

    1. A higher priority thread is ready to run (e.g. higher priority Task, Swi or Hwi).

    2. It makes a blocking call (e.g. Task_sleep).

    Note: Task_yield does not give control to a lower priority task. It only yields to another task of the same priority.

    Todd

  • I believe I tried that already and I think the results were the same or similar. I'll investigate later when I have time to do so, so please keep this open until next week.

    -Matt

  • Matt,

    Sounds good. When you try it, can you check the return from the Mailbox_post also to make sure it is not full (and thus dropping data).

    Todd

  • Ok, so I modified my uart callback function to include UART_read() for the remaining bytes of the frame and a message post check to ensure the mailbox was not full.

    uint32_t uiRemainder_frame_rcv_len = 0;
    
    void vIneedMD_radio_read_cb(UART_Handle sHandle, void *buf, int count)
    {
      tRadio_message tRadio_msg;
      int i = 0;
      int iBuff_Index = 0;
      uint32_t uiRcv = 0;
      uint8_t * c = (uint8_t * )buf;
      bool bDid_msg_post = false;
    
      if(count == 3)
      {
        if(c[0] == PROTOCOL_SOF)
        {
          //Protocol frame
          //
    
          tRadio_msg.uiFrame_len = c[2];
          memcpy(tRadio_msg.uiBuff, c, 3);
          uiRemainder_frame_rcv_len = c[2] - 3;
    
          i = UART_read(sRadio_UART_handle, &c[3], (c[2] - 3));
        }
      }
      else if(count == uiRemainder_frame_rcv_len)
      {
        eRadio_Message_Params_Init(&tRadio_msg);
        tRadio_msg.uiFrame_len = count + 3;
    
        tRadio_msg.eMessage = RADIO_MSG_FINISH_RCV_PROTOCOL_FRAME;
        bDid_msg_post = Mailbox_post(tTIRTOS_Radio_mailbox, &tRadio_msg, BIOS_NO_WAIT);
        
        if(bDid_msg_post == false)
        {
          SYS_EXCEPTION();
        }
    
        uiRemainder_frame_rcv_len = 0;
      }
      else
      {
        return;
      }
    }
    
    
    void vRadio_task(UArg a0, UArg a1)
    {
    
      ERROR_CODE eEC = ER_FAIL;
    
      eRadio_connection_state eConn_State;
      tRadio_message tRadio_Message;
      uint16_t uiRcvd_str_len = 0;
      int i = 0;
      uint8_t cRcv_frame[128];
    
      eRadio_setup();
    
    
      eRadio_Message_Params_Init(&tRadio_Message);
    
      tRadio_msg.eMessage = RADIO_MSG_RCV_PROTOCOL_FRAME;
      Mailbox_post(tTIRTOS_Radio_mailbox, &tRadio_msg, BIOS_NO_WAIT);
    
      while(1)
      {
        if(Mailbox_pend(tTIRTOS_Radio_mailbox, &tRadio_Message, BIOS_WAIT_FOREVER) == true)
        {
          switch(tRadio_Message.eMessage)
          {
            case RADIO_MSG_RCV_PROTOCOL_FRAME://RADIO_REQUEST_RECEIVE_PROTOCOL_FRAME:
              UART_read(sRadio_UART_handle, &cRcv_frame[3], (tRadio_Message.uiFrame_len - 3));
              break;
            
            case RADIO_MSG_FINISH_RCV_PROTOCOL_FRAME:
              if((cRcv_frame[0] == PROTOCOL_SOF) & \
                 (cRcv_frame[tRadio_msg.uiFrame_len + 3] == PROTOCOL_EOF))
              {
                //do something
              }
              
              //begin another uart read to for the next frame
              UART_read(sRadio_UART_handle, cRcv_frame, 3);
              break;
    
            default:
              SYS_EXCEPTION();
              break;
          }
        }
      }
    }

    Again, pardon if the code has a few errors in it but I believe the gist of what I am trying to show is there since I'm bound by a NDA and don't want to disclose non-relevant information.

    Anyway,

    So this seems to work for the most part. I am able to receive somewhat "larger" frames then before but not up to the 64 byes I'll need to receive. Large frames tend to be cut off at about 50 bytes or so and an overflow flag is thrown.

    -Matt

  • Additional, what is received is not corrupted. I'm sending a pattern frame and the bytes are not out of order, just the uart read stops before the end of frame byte is received.

  • Is the data you are losing at the beginning, middle or end of the frame?

    Just to make sure, the RADIO_MSG_RCV_PROTOCOL_FRAME in the switch should never happen now...correct?

    I think you can move the UART_read from the RADIO_MSG_FINISH_RCV_PROTOCOL_FRAME case in the Task to right after the Mailbox_post (with the correct adjustment for the buffer). You'll need to do the first one in the Task, but not again in the loop.

    I'm a little concerned that the Mailbox_post is causing some latency also. Ideally, if you having 2 buffers (e.g. ping-pong) is better. You are processing one while the other one is being filled up. Note: we are working on adding in N buffering into the drivers now for a future release.

    What are the priorities of the interrupts? You can look in Tools->ROV->Hwi to see. A high priority interrupt could be delaying the UART also.

    Another approach you can try is to change the driver to start the interrupt earlier. Currently we have UART_FIFO_RX7_8 in the packages\ti\drivers\uart\UARTTiva.c file. This tells the hardware to trigger an interrupt when the fifo is 7/8 full. You can change the constant (and rebuild the drivers...look in TI-RTOS User Guide on how to do this) to UART_FIFO_RX6_8 or UART_FIFO_RX4_8 (or even 2/8 or 1/8). This way the interrupt would happen sooner and minimize overflow. You'd potentially get more interrupts is the downside.

    Todd

  • Todd,

    So I first tried modifying the UART_FIFO_RXx_x parameter. I didn't do it in the UARTTiva.c file since those are more library files then user modifiable files. I did it after a Uart_open() call and it seemed to modify the right registers as expected (IE UART_IFLS was showing the correct value for the FIFO interrupt). The results for received large frames was the same, frames were cut off before the end and the FIFO overflow error flag was thrown. Other then modifying the FIFO interrupt value was there anything else I needed to do?

    Received frames are being cut off at the end of the frame and are not corrupted other then being short.

    There is no Hwi listed for the UART in the ROV other then one for USB and a few others for timers. I tried declaring a Hwi for UART1 using Hwi_create() but it returned null as the handler. This I assumed was due to the Hwi for UART1 being instantiated elsewhere in the RTOS code and was not user accessible. Therefore I could not increase the priority for the UART Hwi priority.
  • Unfortunately we "construct" the interrupt (Hwi) in the UARTTiva.c file instead of calling "create". Constructed kernel objects do not appear in ROV. We do construct to avoid memory allocation (create allocates, construct fills in a supplied one).

    Since the UARTTiva driver constructs the interrupt, it makes sense that you cannot.

    We need to brain-storm a little more on our end to see if there is another approach. Have you tried lowering the baudrate?

    Todd

  • Ok. We have some ideas. Please see if it impacts the issue after each one

    0. Simply for diagnostics, if you lower the baudrate, at what rate does the problem disappear.

    1. Can you make sure you are using the nonInstrumented UART driver library? Make sure the following is in your .cfg file.

    UART.libType = UART.LibType_NonInstrumented;

    If possible, can you attach your .cfg file?

    2. Please set the RX fifo level to 1/8 after you call UART_open

    3. Set the Hwi priority to 0x40 after you call UART_open

    #include <ti/sysbios/family/arm/m3/Hwi.h>

    UART_open(...);
    Hwi_setPriority(intNum, 0x40); // intNum specified in the UART_HwAttrs structure in the "board.c" file.

    4. Raise the priority of your task that is receiving msgs on the mailbox. (or is nothing really else going on with the system)

    5. I know this one might not be possible...Try the UARTTivaDMA driver in the 2.10.01 release (http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/index.html).

    We had some additional questions...

    a. How do you know the end is missing? Are you just halting the processor and looking at the Task's buffer in memory.

    b. Are you writing out the UART also? If so, does it occur at the same time as the read?

    We might have found an issue with the lack of a "volatile" in one of the UARTTiva data structures, but we think that it would result in corruption instead of overruns. If the above does not help the issue, we can try a couple more things.

    Todd

  • If possible, can you attach your .cfg file?

    It is attached

     

    How do you know the end is missing? Are you just halting the processor and looking at the Task's buffer in memory.

    We are using a custom protocol with start, end frame bytes, and a length byte. So when receive the frame I know when the frame is started, how many more bytes I can expect and an end byte to verify that the end of the frame was received. Looking at the receive buffer that is being filled I get the start byte, length byte and the content but the end of frame byte is never received as well as the remaining data bytes that are expected.

    IE

    //expected frame
    0x9c 0x01 0x39 0x12 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xc9
    
    //what is copied into the receive buffer
    0x9c 0x01 0x39 0x12 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee 0xff 0xaa 0xbb 0xcc 0xdd 0xee

    The frame send it a test frame with a repeating pattern so I can visually see if there is any corruption. But there isn't any and the memory buffer is simply not filled up with the remaining bytes. NOTE: the memory buffer is sufficiently big enough for the received frame.

     

    Are you writing out the UART also? If so, does it occur at the same time as the read

    As far as I can tell we are not writing out as the same time as a read. I'll investigate to ensure that that isn't happening.

     

    I know this one might not be possible...Try the UARTTivaDMA driver in the 2.10.01 release (http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/index.html).

    We need the new features in the 2.10 TI-RTOS release and I am currently implementing it. So this may make this issue mute after all. Keep this issue open for the next week and I'll update the status.

    var Defaults = xdc.useModule('xdc.runtime.Defaults');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Error = xdc.useModule('xdc.runtime.Error');
    var Log = xdc.useModule('xdc.runtime.Log');
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Main = xdc.useModule('xdc.runtime.Main');
    var SysMin = xdc.useModule('xdc.runtime.SysMin');
    var System = xdc.useModule('xdc.runtime.System');
    var Text = xdc.useModule('xdc.runtime.Text');
    
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    var Clock = xdc.useModule('ti.sysbios.knl.Clock');
    var Task = xdc.useModule('ti.sysbios.knl.Task');
    var Watchdog = xdc.useModule('ti.drivers.Watchdog');
    var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
    var GPIO = xdc.useModule('ti.drivers.GPIO');
    var UART = xdc.useModule('ti.drivers.UART');
    var SPI = xdc.useModule('ti.drivers.SPI');
    var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');
    var I2C = xdc.useModule('ti.drivers.I2C');
    var Queue = xdc.useModule('ti.sysbios.knl.Queue');
    var Timer = xdc.useModule('ti.sysbios.hal.Timer');
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    var SDSPI = xdc.useModule('ti.drivers.SDSPI');
    
    /*
     * Uncomment this line to globally disable Asserts.
     * All modules inherit the default from the 'Defaults' module.  You
     * can override these defaults on a per-module basis using Module.common$.
     * Disabling Asserts will save code space and improve runtime performance.
    Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
     */
    
    /*
     * Uncomment this line to keep module names from being loaded on the target.
     * The module name strings are placed in the .const section. Setting this
     * parameter to false will save space in the .const section.  Error and
     * Assert messages will contain an "unknown module" prefix instead
     * of the actual module name.
    Defaults.common$.namedModule = false;
     */
    
    /*
     * Minimize exit handler array in System.  The System module includes
     * an array of functions that are registered with System_atexit() to be
     * called by System_exit().
     */
    System.maxAtexitHandlers = 4;
    
    /*
     * Uncomment this line to disable the Error print function.
     * We lose error information when this is disabled since the errors are
     * not printed.  Disabling the raiseHook will save some code space if
     * your app is not using System_printf() since the Error_print() function
     * calls System_printf().
    Error.raiseHook = null;
     */
    
    /*
     * Uncomment this line to keep Error, Assert, and Log strings from being
     * loaded on the target.  These strings are placed in the .const section.
     * Setting this parameter to false will save space in the .const section.
     * Error, Assert and Log message will print raw ids and args instead of
     * a formatted message.
    Text.isLoaded = false;
     */
    
    /*
     * Uncomment this line to disable the output of characters by SysMin
     * when the program exits.  SysMin writes characters to a circular buffer.
     * This buffer can be viewed using the SysMin Output view in ROV.
    SysMin.flushAtExit = false;
     */
    
    /*
     * The BIOS module will create the default heap for the system.
     * Specify the size of this default heap.
     */
    BIOS.heapSize = 2048;
    
    /*
     * Build a custom SYS/BIOS library from sources.
     */
    BIOS.libType = BIOS.LibType_NonInstrumented;
    
    /* System stack size (used by ISRs and Swis) */
    Program.stack = 2048;
    
    /* Circular buffer size for System_printf() */
    SysMin.bufSize = 512;
    
    /*
     * Create and install logger for the whole system
     */
    var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.numEntries = 16;
    var logger0 = LoggerBuf.create(loggerBufParams);
    Defaults.common$.logger = logger0;
    Main.common$.diags_INFO = Diags.ALWAYS_ON;
    
    System.SupportProxy = SysMin;
    
    SysMin.flushAtExit = true;
    
    Watchdog.libType = Watchdog.LibType_NonInstrumented;
    GPIO.libType = GPIO.LibType_NonInstrumented;
    UART.libType = UART.LibType_NonInstrumented;
    BIOS.assertsEnabled = false;
    BIOS.logsEnabled = false;
    BIOS.customCCOpts = "--endian=little -mv7M4 --abi=eabi --float_support=fpv4spd16 -q -ms --opt_for_speed=2  --program_level_compile -o3 -g --optimize_with_debug";
    SPI.libType = SPI.LibType_NonInstrumented;
    var mailbox0Params = new Mailbox.Params();
    mailbox0Params.instance.name = "tTIRTOS_Radio_mailbox";
    Program.global.tTIRTOS_Radio_mailbox = Mailbox.create(268, 4, mailbox0Params);
    var mailbox1Params = new Mailbox.Params();
    mailbox1Params.instance.name = "tUI_mailbox";
    mailbox1Params.buf = null;
    mailbox1Params.bufSize = 0;
    Program.global.tUI_mailbox = Mailbox.create(8, 18, mailbox1Params);
    I2C.libType = I2C.LibType_NonInstrumented;
    var queue0Params = new Queue.Params();
    queue0Params.instance.name = "tUI_queue";
    Program.global.tUI_queue = Queue.create(queue0Params);
    Idle.idleFxns[0] = "&vIdle_Task";
    var mailbox2Params = new Mailbox.Params();
    mailbox2Params.instance.name = "tTIRTOS_cmnd_protocol_mailbox";
    Program.global.tTIRTOS_cmnd_protocol_mailbox = Mailbox.create(136, 3, mailbox2Params);
    SDSPI.libType = SDSPI.LibType_NonInstrumented;
    Task.idleTaskStackSize = 512;
    var task4Params = new Task.Params();
    task4Params.instance.name = "USB_task";
    task4Params.priority = 14;
    task4Params.stackSize = 1024;
    Program.global.USB_task = Task.create("&vUSB_task", task4Params);
    var task1Params = new Task.Params();
    task1Params.instance.name = "Ineedmd_command_task";
    task1Params.priority = 4;
    Program.global.Ineedmd_command_task = Task.create("&vIneedmd_command_task", task1Params);
    var task2Params = new Task.Params();
    task2Params.instance.name = "IneedMD_radio_task";
    task2Params.priority = 13;
    task2Params.stackSize = 2048;
    Program.global.IneedMD_radio_task = Task.create("&vIneedMD_radio_task", task2Params);
    BIOS.runtimeCreatesEnabled = true;
    var task3Params = new Task.Params();
    task3Params.instance.name = "Ineedmd_UI_task";
    task3Params.priority = 3;
    task3Params.stackSize = 768;
    Program.global.Ineedmd_UI_task = Task.create("&vIneedmd_UI_task", task3Params);
    var task4Params0 = new Task.Params();
    task4Params0.instance.name = "Ineedmd_waveform_task";
    task4Params0.priority = 12;
    task4Params0.stackSize = 1280;
    Program.global.Ineedmd_waveform_task = Task.create("&vIneedmd_waveform_task", task4Params0);
    var mailbox3Params = new Mailbox.Params();
    mailbox3Params.instance.name = "tUSB_mailbox";
    Program.global.tUSB_mailbox = Mailbox.create(16, 2, mailbox3Params);
    var mailbox4Params = new Mailbox.Params();
    mailbox4Params.instance.name = "tEKG_mailbox";
    Program.global.tEKG_mailbox = Mailbox.create(1, 3, mailbox4Params);
    var clock0Params = new Clock.Params();
    clock0Params.instance.name = "tUI_comms_led_timer";
    clock0Params.period = 0;
    clock0Params.startFlag = false;
    Program.global.tUI_comms_led_timer = Clock.create("&vIneedmd_UI_Comms_led_timer_INT_Service", 1, clock0Params);
    var clock1Params = new Clock.Params();
    clock1Params.instance.name = "tUI_heart_led_timer";
    Program.global.tUI_heart_led_timer = Clock.create("&vIneedmd_UI_Heart_led_timer_INT_Service", 1, clock1Params);
    var clock2Params = new Clock.Params();
    clock2Params.instance.name = "tUI_power_led_timer";
    Program.global.tUI_power_led_timer = Clock.create("&vIneedmd_UI_Power_led_timer_INT_Service", 1, clock2Params);
    var clock3Params = new Clock.Params();
    clock3Params.instance.name = "tUI_sounder_timer";
    Program.global.tUI_sounder_timer = Clock.create("&vIneedmd_UI_Sounder_timer_INT_Service", 1, clock3Params);
    var timer0Params = new Timer.Params();
    timer0Params.instance.name = "tSounder_pwm_timer";
    timer0Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
    Program.global.tSounder_pwm_timer = Timer.create(-1, "&vSounder_timer_INT_Service", timer0Params);
    var clock4Params = new Clock.Params();
    clock4Params.instance.name = "tRadio_conn_timeout_timer";
    Program.global.tRadio_conn_timeout_timer = Clock.create("&vRadio_conn_timout_int_service", 1, clock4Params);
    var task5Params = new Task.Params();
    task5Params.instance.name = "Power_Control_task";
    task5Params.priority = 2;
    task5Params.stackSize = 1024;
    Program.global.Power_Control_task = Task.create("&vPower_Control_task", task5Params);
    var mailbox5Params = new Mailbox.Params();
    mailbox5Params.instance.name = "tPC_mailbox";
    Program.global.tPC_mailbox = Mailbox.create(1, 3, mailbox5Params);
    var clock5Params = new Clock.Params();
    clock5Params.instance.name = "tPower_Control_shutdown_timer";
    Program.global.tPower_Control_shutdown_timer = Clock.create("&vPower_Control_shtdwn_timeout_int_service", 1, clock5Params);
    var timer1Params0 = new Timer.Params();
    timer1Params0.instance.name = "tWaveform_timer";
    timer1Params0.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
    timer1Params0.period = 5000;
    Program.global.tWaveform_timer = Timer.create(-1, "&vWaveform_timer_INT_Service", timer1Params0);
    var clock6Params = new Clock.Params();
    clock6Params.instance.name = "tADC_read_temp_clock";
    clock6Params.period = 60000;
    Program.global.tADC_read_temp_clock = Clock.create("&vADC_temperature_read_int_service", 1, clock6Params);
    var clock7Params = new Clock.Params();
    clock7Params.instance.name = "tADC_read_volt_clock";
    clock7Params.period = 5000;
    Program.global.tADC_read_volt_clock = Clock.create("&vADC_batt_volt_read_int_service", 1, clock7Params);
    var clock8Params = new Clock.Params();
    clock8Params.instance.name = "tProto_Cmndr_status_clock";
    clock8Params.period = 20000;
    Program.global.tProto_Cmndr_status_clock = Clock.create("&vProto_Commander_status_INT_service", 20000, clock8Params);
    var clock9Params = new Clock.Params();
    clock9Params.instance.name = "tUI_power_led_status_check_timer";
    clock9Params.period = 0;
    clock9Params.startFlag = false;
    var clock9Params = new Clock.Params();
    clock9Params.instance.name = "tUI_power_led_status_check_timer";
    clock9Params.period = 5000;
    clock9Params.startFlag = true;
    Program.global.tUI_power_led_status_check_timer = Clock.create("&vUI_power_led_status_check_timer", 30000, clock9Params);
    var clock10Params = new Clock.Params();
    clock10Params.instance.name = "tRadio_rcv_timeout";
    clock10Params.period = 0;
    Program.global.tRadio_rcv_timeout = Clock.create("&vRadio_rcv_timeout_service_INT", 5000, clock10Params);
    Task.enableIdleTask = true;
    var clock11Params = new Clock.Params();
    clock11Params.instance.name = "tProto_Cmndr_RTC_clock";
    clock11Params.period = 1000;
    clock11Params.startFlag = true;
    Program.global.tProto_Cmndr_RTC_clock = Clock.create("&vProto_Cmndr_RTC_clock_INT_service", 5000, clock11Params);
    

  • I have resolved this issue by upgrading to TI-RTOS 2.10 and implementing the DMA feature into the uart.

    See this post: http://e2e.ti.com/support/embedded/tirtos/f/355/t/389439