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.

请问一下,28335在eCAN中断服务程序里,访问不了结构体字段的问题



目前遇到一个问题,就是在eCAN中断服务程序里,访问不了结构体字段,请高手帮忙看一下,

结构体定义如下:

typedef union
{
  Uint64 data;

struct __60B
{
Uint64 rsvd0       :48;
Uint64 rsvd1      :2;
Uint64 rsvd2       :6;
Uint64 number   :8;
}Status;

}myDataType;

在中断服务程序里,

 Uint16  N;

CANISR()

{

    Uint64   candata;

    N =  (myDataType) candata.Status.number;

}

在CCS6.0 观察窗口里,能看到candata.Status.number  =1(CAN传来的数据),但是,奇怪的是,N值 就是一直观察为0

不知道为什么?