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.

CC2651R3: Seeking guidance to include Display_printf instead of Log_info print

Part Number: CC2651R3

Tool/software:

Dear Texas Instruments Support Team,

CCS Version - 12.7

SDK Version simplelink_cc13xx_cc26xx_sdk_7_41_00_17

Compiler Version - 3.2.0 LTS

I hope this message finds you well.

I am currently working on a project (using Project_Zero as a base code) using the CC2651R3 microcontroller and would like to replace the Log_info print function with Display_printf for outputting log messages over UART. While I understand the basic implementation of Display_printf, I am seeking some guidance on to include Display_printf instead of Log_info print.

Specifically, I would appreciate assistance with the following:

  1. Proper replacement methodology for Log_info statements with Display_printf.
  2. Any other considerations or advice you may have when using Display_printf over UART for logging purposes on the CC2651R3.

I would be grateful for any documentation, examples, or insights you can provide to facilitate this process.

Thank you for your continued support. I look forward to your guidance and advice.

Best Regards,

Rajnish Singh

  • Hello Rajnishkumar Singh,

    In your SDK in syscfg go to the Display driver and click "examples" this will bring up documentation, and code snippets on how to properly use/configure the display driver! Use sprintf to a buffer to load up data before display_printf. Don't use Display_printf and UART2 at same time. 

    Thanks,
    Alex F

  • Hi Alex Fager,

    Thanks for your response,

    I already included above mentioned steps in my project.

    Before including above steps for display_printf i have to disable Log_info print function.

    I commented all the Log_info print function as well as initialization part used in project_zero.

    I am encountering below problem after comment Log_info part (refer attached screenshot),

    Kindly, go through this and provide the solution,

    Best Regards,

    Rajnish Singh

  • Hello Rajnish Singh,

    I will try and replicate the error you see. 

    Thanks,
    Alex F

  • Hi Alex Fager,

    Thanks looking into the issues,

    To avoid above mentioned 'uartlog_flush' compilation error, I imported CC2651R3 another example code (simple_peripheral_oad_offchip where already used Display_printf UART print).

    Copied the simple_peripheral_oad_offchip.syscfg file into my custom project (which is based on project_zero example code) and did all the changes as per project_zero.syscfg in simple_peripheral_oad_offchip.syscfg.

    Excluded from build project_zero.syscfg, and build the project.

    After done this not getting any compilation error, now able to print on UART using Display_printf.

    The issue is facing now, i am able to print only one line at a time. This line will be replaced by new print (refer the attached screenshot)

    Unable to print multiple line or continuous print, for continuous print what process i have to follow or am i missing anything?

    Kindly, go through this and suggest the same.

    Best Regards,

    Rajnish Singh

  • Hello Rajnish Singh,

    The issue is facing now, i am able to print only one line at a time.

    -Did you include a return, new line at the end of each message/command? IE "Hello world\r\n"

    ->

    Hello world

    Vs

    "Hello world"

    -> "Hello world"

    By using return newline each time Displayprinf is called you should see that data update on a new line, instead of overwriting the last one. 

    Thanks,
    Alex F

  • Hello Alex Fager,

    Did you include a return, new line at the end of each message/command? IE "Hello world\r\n"

    Yes i already tried the same, getting same result (unable to print on new line).

    Kindly, refer below code snippet,

    if (events & PZ_PERIODIC_EVT)
        {
            events &= ~PZ_PERIODIC_EVT;
            Util_startClock(&periodicClock);
            uptime += (PZ_PERIODIC_EVT_PERIOD/1000);
    
    //        Log_info1("Uptime: " ANSI_COLOR(FG_BLUE) "%d" ANSI_COLOR(ATTR_RESET), uptime);
    
            Display_printf(dispHandle, 0, 0, "uptime: %d\r\n", uptime);
        }

    Best Regards,

    Rajnish Singh

  • Hello Rajnish Singh,

    Can you do this quick test? 

    Display_printf(handle, 0, 0, "Test 0");

    and then

    Display_printf(handle, 0, 0, "Test 1\r\n");
    In my code output (below) I see that \r\n adds space, how is your display configured? 

    What does the output look like? 
    (*note that I configured handle = Display_open(Display_Type_UART, &params);)

    Thanks,
    Alex F