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.

C2000 中寻址结构体或者共同体需要的执行时间长吗

测AD中断的执行时间,发现对结构体或者共同体变量做赋值操作会耗费不少总线时间。

比如:DCA_L[Order_IndexA[i]].bit.ORDER = i;                                  //其中DCA_L是局部的共同体变量

想请问下:这个语句相对于普通变量的赋值语句,执行时间要长很多吗?为什么呢?

如果我想减少执行时间,能做什么改进?比如把局部变量定义成全局的会不会好些

请大神赐教,我也会做试验,到时反馈给大家~