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.

DAC61416正常运行与SPI通信

在使用SPI读取DEVICEID来验证SPI是否通信成功时存在SPI接受到的数据与发送数据一样问题,具体如下:

VDD(5V), VAA(5V), VCC(+12V), VSS(-12V), VIO(1.8V)电源均正常,先将DEV-PWDWN位置0来使芯片工作,按照数据手册中规定的SPI方式编写如下代码,
发现SPI_Receive收到的数据与SPI_Transmit一样,ID1[0]=0x81,ID1[1]=0x00,ID1[2]=0x00;而且REF引脚也未测量到2.5V电压,请问这是什么原因?

//Power-on Device
uint8_t ***[3]={DACX1416_SPICONFIG,0x0A,0x84};
SPI1_1_NSS_Enable();
HAL_SPI_Transmit(&hspi1, ***, 3, DACx1416_Timeout_3);
SPI1_1_NSS_Disable();

uint8_t cmd[3] = {0x81,0x00,0x00};
uint8_t ID1[3] = {0x00,0x00,0x00};
uint16_t DACX61416_ID = 0;
//0x81=23-16位,R/W读写位(1x)+DEVICEID Register 01h
SPI1_1_NSS_Enable();
/* Send the read ID command */
HAL_SPI_Transmit(&hspi1, cmd, 3, DACx1416_Timeout_3);
/* Reception of the data */
HAL_SPI_Receive(&hspi1,ID1, 3, DACx1416_Timeout_3);
SPI1_1_NSS_Disable();
printf("%x%x\n",ID1[1],ID1[2]);
DACX61416_ID = ((ID1[1] << 8) | ID1[2]) & 0xFC;
printf("%x\n",DACX61416_ID);