ads1259的SPI读取数据问题,读寄存器数据错误

请问,spi的速率多大可以?命令之间都要加短暂的延时吗??

在我读取寄存器数据的时候,读出来是:

ADS1259_REG[0] = 0x25
ADS1259_REG[1] = 0x8
ADS1259_REG[2] = 0xc0
ADS1259_REG[3] = 0x0
ADS1259_REG[4] = 0x0
ADS1259_REG[5] = 0x0
ADS1259_REG[6] = 0x0
ADS1259_REG[7] = 0x0
ADS1259_REG[8] = 0x40

但我写的时候是

ADS1259_WRITE(CMD_SDATAC);//Stop Read Data Continuous mode
ADS1259_WRITE(0X40);//write start from 00h
ADS1259_WRITE(0X08);//write 9 reg 8+1=9

ADS1259_WRITE(0X05);//00000101 RBIAS + spi timeout
//ADS1259_WRITE(0X01);//00000001 spi timeout
ADS1259_WRITE(0X14);//00011000 SINC2 + EXTREF
ADS1259_WRITE(0X03);//60sps , gate Convert mode
//OFC[2:0]
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X00);
//FSC[2:0]
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X00);
ADS1259_WRITE(0X40);

请问,为什么会这样,希望帮忙解答下~~

谢谢

2 个回复