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.

TMS320F28069M: Printf() takes 20ms to print a NewLine character with CCS debugger

Part Number: TMS320F28069M
Other Parts Discussed in Thread: DRV8301

Hi,

I am using DRV8301 kit with PICCOLO MCU and I'm testing the "printf()" function that sends data to the console view in my CCS.

I have done a few tests to see how much it takes to print the letters. Printf() was executed once per second from the main loop and CPU_TIME module was used to get the amount of cycles passed.

What I noticed is that printing a newline character ("/n") takes about 2 000 000 ticks, what equals to roughly 20ms at 90 MHz CPU frequency! This is unacceptable amount of time. For comparison, a carriageReturn ("\r") character takes only 400 ticks.

I have confirmed the result by looping the printf("\n") 50 times and toggling the LED afterwards - indeed, the LED blinked about once per second.

What's interesting, the timing seems to be OK after finishing the debugger.

So, the question arises - is it normal and is there any way to walk around this? I thought about using "\r" instead, but I still need at least one "\n" somewhere in the code (otherwise the function will not print at all).