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.

LAUNCHXL-CC1352P: Usage of CUI on CCS

Part Number: LAUNCHXL-CC1352P
Other Parts Discussed in Thread: SYSCONFIG, CC2650

Hi!

I am using an example code available on SimpleLink CC13xx CC26xx SDK 7.10.02.23 and noticed that in many other examples there is an "#if TIOP_CUI" or "#if BOARD_DISPLAY_USE_UART && !TIOP_CUI"

I searched where these macros are defined and only found what I suppose must be the definition in the .cproject file:
<listOptionValue builtIn="false" value="TIOP_CUI=1"/>

Where is this defined? I searched at the SysConfig but didn't find anything about it. I know there is the Display driver I can select on SysConfig but I found nothing related to the CUI.

Best regards,
Eduardo.

  • Hi Eduardo,

    Please can you mention which specific examples you are talking about. If you are searching for enabling console output. There is a debug configuration setting called enabling CIO. 

    You cab find this is project properties-> Debug->Program/Memory Load Options 

    Regards,

    Sid

  • Hi Sid,

    I am now using the CC1352P-2 Thermostat OpenThread example. I'm running it on the LP CC1352P1 (disabling the high PA config).

    I'd like to add some debug prints that I could follow along during the execution of the code. I tried adding the UART2 API but it did not work for a reason that I still don't know.
    I'm used to CC2650 and with it I can use printf() with no problems, but it doesn't work on CC1352 projects (I don't know how it is set up).

    Regards,

    Eduardo.

  • Hi Eduardo,

    I tried adding the UART2 API but it did not work for a reason that I still don't know.

    I am not familiar with the Open thread example. But if it is a network co processor example, maybe the UART is already being used for that?

    with respect to the printf() you are referring to, please can you point to an example that uses this. Might be something that can be enabled in CC1352 as well.

    Regards,

    Sid

  • Hi Sid,

    But if it is a network co processor example, maybe the UART is already being used for that?

    It is the thermostat example, but I already fixed this. I was having a problem with the UART2 initialization, but now it is working.

    with respect to the printf() you are referring to, please can you point to an example that uses this.

    I'm sorry I don't think I could understand. You want me to show where I wanna use printf() in the Thermostat example code?

    Regards.

  • Hi Eduardo,

    Great that you were able to get the UARt prints working. I understood that you are using the open thread thermostat example, are you saying that the display in that example is not working?

    Regards,

    Sid

  • Hi Sid,

    are you saying that the display in that example is not working

    No, I'm talking about adding debug prints in the code. I'm not using the LCD screen if that's what you mean. I am using UART2 to add some outputs in the code. My question is related to why do I need to use UART2_write(...) while adding a printf() does not show anything in the serial.

    And the first question that opened this thread is how the TIOP_CUI is enabled in the codes. I'd like to disable it and just add some prints to the serial instead.

    Best regards,
    Eduardo.

  • Hi Eduardo,

    Thank you for the clarification. If you want to disable disable the TIOP_CUI, Right click on your project, go to project properties. Under CCS Build->Arm compiler->Predefined Symbols, you see the symbols. You can remove the TIOP_CUI define from there and rebuild the project. 

    Related to printf(), which is the exact API you used that is not working. I see there are DISPUTILS_SERIALPRINTF API that should work for using the uart display.

    Regards,

    Sid

  • Hid Sid,

    Thank you for the tip! About the printf() case, do you know what I could do to enable the function to output to the serial? Or do I need to use the API UART functions instead?

    Thanks!

  • Hi Eduardo, 

    The SDK user's guide has a section about debugging output. 

    dev.ti.com/.../Users_Guide.html

    This seems to clarify the options. printf() itself is not supposed to be used. But rather the Display driver or the UARt driver is the recommended approach.

    Regards,

    Sid

  • Thank you very much for your support Sid!