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.

TMS320F280039C-Q1: Will the LCR instruction's machine cycle be longer than the RPT instruction's machine cycle?

Part Number: TMS320F280039C-Q1


Tool/software:

Hi Experts,

I am asking for my customer here.

Will the LCR instruction's machine cycle be longer than the RPT instruction's machine cycle?

This question is from the below e2e thread, due to without RPT instruction's CPU loading highly increased here and then will cause task run abnormally. Could you give us detailed about LCR instruction's machine cycle be longer than the RPT instruction's machine cycle? Thanks.

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1425879/tms320f280039c-q1-rpt-will-cause-others-cpu-timer-hang

  • The LCR and RPT are really not to be compared. It looks like the code which was originally using "RPT" is now taking much longer without RPT. This is to be expected. RPT is a very efficient way to repeat an operation . The downside is that it is not interruptible. When you try to build the same iterations without RPT, then the code has to generate loops using branches which are quite inefficient. Hence, the cycle time of the same task (now running without RPT) will go up. Looks like this is what is happening there. LCR is a function call return and is not in anyway related to the RPT instruction.