目前在使用ADE7978芯片组, 遇到的问题是ADE7978在复位之后读取到的STATUS1寄存器(0xE503)的数据为0x000001A0, 手册当中描述的位21始终为1, 是不是意味着我读出的数据是错误的?
初始化程序如下:
void init_curr_ade7978(void)
{
init_spi0();
I_RST_DIS;
SysCtlDelay((40000000/300000));
I_RST_EN;
SysCtlDelay((40000000/300000));
I_RST_DIS;
SysCtlDelay((40000000/30000));
I_SS_HIGH;
SysCtlDelay((40000000/300000));
I_SS_LOW;
SysCtlDelay((40000000/300000));
I_SS_HIGH;
SysCtlDelay((40000000/300000));
I_SS_LOW;
SysCtlDelay((40000000/300000));
I_SS_HIGH;
SysCtlDelay((40000000/300000));
I_SS_LOW;
SysCtlDelay((40000000/300000));
I_SS_HIGH;
SysCtlDelay((40000000/300000));
ade7978_wr_byt(ADE7978_CURR, CONFIG2, 0);
ade7978_wr_4byt(ADE7978_CURR, MASK1, 0x8000);
}