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/CC3220MODA: How to read keyboard input from CCS console?

Part Number: CC3220MODA

Tool/software: Code Composer Studio

Hello,

What's the best way to read input from the CCS console on the CC3220?  I'm using freertos, and putting my console read logic into a task (lower priority than other tasks).  I'm using fgets(buf, buf_size, stdin) and it seems to read the characters, but blocks the rest of the application from running.

Any ideas?

thanks!

Joe K.

  • If I understand it properly (I have little experience with CCS), the "CCS console" and C standard library I/O use the technique called "semihosting" - it uses a debugger breakpoint to read and write characters to the host PC (which is attached through a debugger - an XDS110 compatible, for example, in case of a LaunchPad). Whenever you read or write any single character, the CPU core is halted - as if it reached a debug breakpoint. The debugger is not aware of the processes in FreeRTOS, so it can not break the execution of only one single process, leaving others running.

    This is a debug-only technique, and if you want some character i/o in your device, you should use UART, for example - maybe even with some sort of a "driver" which makes it more like the standart C i/o. There should be more examples in the SDK.

  • Hi Alexander,
    Thank you for the explanation - it makes sense.
    We were using a UART on the development kit but now have moved onto our custom board and we are using all the pins on the processor, so there is no room for a UART. This is just a temporary situation until we get all the development completed.
    Regards,
    Joe
  • Hi Joseph,

    I'm not familiar with the CCS console input, but there is an option to use the terminal inside CCS: View -> terminal -> Open a Terminal -> and choose Serial.  This will, however, require a UART connection.  Since all pins are occupied in your current stage of development, this probably isn't an option.