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.

CCS_V5 Console I/O (CIO) standard input halts the processor



CCS_V5 Console I/O (CIO) standard input halts the processor at a breakpoint.  

Is there a method to determine if there's Console Input and still allow other tasks to execute?

  • #ifdef CCSv5_CONSOLE
            // Service Code Composer CIO UART
            {
                uint32_t    success;
                uint32_t    bufferlen;
                char      * bufferptr = (char *)&rx_buf[0];
                char        bufferchr;
                rx_cnt = 0;
                do
                {
                    success = fgetpos(stdin, &bufferlen);
                    if (success > 0) {
                        fgets(bufferptr, (INPUT_BUFF_SIZE-rx_cnt), stdin);
                        bufferlen = strlen( bufferptr );
                        rx_cnt +=  bufferlen;
                        bufferchr = bufferptr[ bufferlen-1 ];
                        if ((bufferchr == CR) || (bufferchr == LF)) {
                            break;
                        }
                        bufferptr += bufferlen;
                    }
                } while (rx_cnt < INPUT_BUFF_SIZE);
            }
            // We just got a CR so the buffer should contain one or
            // more commands. Send a LF (echo), NULL terminate the buffer,
            // then send the complete command(s) to the Parser for execution.
            rx_buf[rx_cnt++] = '\0';
            rx_char = LF;
            putchar(rx_char);
    #endif  // CCSv5_CONSOLE