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.

OMAPL138 MDIO模块ALIVE寄存器读到值和通过仿真器看到的值不一致



TI专家、各位朋友:

通过如下代码读到ALIVE寄存器的值是0,而实际值是1(后面有表述)

unsigned int MDIOPhyAliveStatusGet(unsigned int baseAddr)
{
unsigned int state=0;

state=(HWREG(baseAddr + MDIO_ALIVE));

printf("address=%x\n",baseAddr + MDIO_ALIVE);

printf("state=%d\n",state);
return state;
}

设置断点,打印信息如下:

问题是:读到state的值是0,而查看寄存器和通过memory browser看到的值都是1,非常奇怪的问题,ALIVE寄存器的地址和手册对照了下,也没有什么问题。