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: __byte()赋值问题

Part Number: TMS320F280039C


你好,我在进行Can报文发送时,需要将现有地址的16bit的数据高8位和低8位放进MCAN的数据结构体tTxBufElement中,使用了__byte(), 但是在使用中发现会偶尔出现异常数据,需要在这个赋值命令前后加上关闭中断和使能中断命令,请问这是什么原因?

DINT;

tTxBufElement.data[2i] = DATA[i];

EINT;