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.

RTOS: Query about uart emulator in sensor controller studio(cc2650)

Other Parts Discussed in Thread: CC2650

Tool/software: TI-RTOS

I wonder if the SCS's emulated UART can be used in interrupt mode?

COZ i check the generated code as below

... ...

while (1) {

// Loop back any received characters
while (scifUartGetRxFifoCount()) {
scifUartTxPutChar((char) scifUartRxGetChar());
}
}

seems it use polling mode to determine if it is time to receive.

  • Hello User,
    scifUartSetRxFifoThr(<number of bytes to wait for>);
    scifUartSetEventMask(BV_SCIF_UART_ALERT_RX_FIFO_ABOVE_THR );
  • Hi, Eirik
    Thanks,do you mean i can use system cpu alert interrupt?
    There actually is a checkbox with that name when configuring UART emulator,
    but I have no idea how to use that interrupt, COZ i found there is no difference for the generated code, no matter checking or unchecking that box.
  • Hello User,
    No, the UART emulator is a state machine (algorithm in assembler) that runs continuously when started from the application processor (CM3 on CC2650) meaning that you usually don't use any other resource for the UART task. I was referring to application code running on the main application processor. Refer to the main_tirtos.c file the the uart_emulator example project and change the lines i posted above to allow application task to sleep (pend on semaphore (semScTaskAlert) until you received the desired number of characters.
  • Hi, Eirik
    It seems I can not configure uart emulator to use TI-RTOS?
    The generated IAR project complains below error message when building:
    #error "Generated SCIF driver supports incorrect operating system. Please change to 'None' in the Sensor Controller Studio project panel and re-generate the driver."
    do you have any idea on this ? thanks lots!
  • Hello User,
    You must open the correct project:
    projects\iar_tirtos
    and not
    projects\iar
  • Hi, Eirik

    Seems i can not generate iar_tirtos project, even i change Operating system option(in project settting)from none to TI-RTOS, do you know why?

    thanks!