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.

TMS320F280049: looking for method of optimize driverlib execution time

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Dear C2000 expert,

Currently I'm testing the driverlib code excute efficiency, and found that the driverlib code executiion takes longer time than bit field method.

Below codes that I've used to test the code efficiency, the driver lib code takes about 1500ns time at CPU frequency set as 100MHz, writing to bit field register takes about 680ns at CPU configured at 100Mhz. It looks to me that driverlib code execution efficiency is not very good, is there any way to optimize it?

driverlib code: takes 1500ns

GPIO_togglePin(DEVICE_GPIO_PIN_LED1);
GPIO_togglePin(DEVICE_GPIO_PIN_LED2);

writing to bit fields in register: takes 680ns

GpioDataRegs.GPATOGGLE.bit.GPIO23 = 1;
GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;

Happy Thanksgiving Day.