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.

Compiler/TMS320F28377S: C2000 Pipeline optimization

Part Number: TMS320F28377S

Tool/software: TI C/C++ Compiler

Hello there,

I use a TMS320F28377S for high-performance control of Motors. The control-loop of my design runs at 20kHz. Therfore, I need to optimize my code for runtime.

In each cycle, I have several safety checks (overcurrent, ...) and I'm worried that branch prediction of the compiler has a hard time predicting it right, namely that in 99.99999% there is no overcurrent situation, causing the instruction pipeline to flush very often.

Is there any way to tell the compiler the correct branch prediction? I wasn't able to find anything.