current position:Home>Ad5761 cannot output voltage, and the SPI readback value is incorrect

Ad5761 cannot output voltage, and the SPI readback value is incorrect

2022-02-04 16:34:03 CSDN Q & A

    CS0_L;  //cs Pull it down             while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0x01);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[1] = LL_SPI_ReceiveData8(SPI1);            while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0xFF);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[2] = LL_SPI_ReceiveData8(SPI1);            while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0xFF);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[3] = LL_SPI_ReceiveData8(SPI1);        CS0_H;    LDAC_L;  //ldac Pull it down         LL_mDelay(200);        LDAC_H;  //ldac pull up     LL_mDelay(200);    CS0_L;  //cs Pull it down         while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0x0B);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[3] = LL_SPI_ReceiveData8(SPI1);            while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0x00);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[2] = LL_SPI_ReceiveData8(SPI1);            while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0x00);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[1] = LL_SPI_ReceiveData8(SPI1);        CS0_H;    LL_mDelay(200);    CS0_L;  //cs Pull it down         while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0x00);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[3] = LL_SPI_ReceiveData8(SPI1);            while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0x00);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[2] = LL_SPI_ReceiveData8(SPI1);            while(!LL_SPI_IsActiveFlag_TXE(SPI1));        // Wait for the data to be sent      LL_SPI_TransmitData8(SPI1,0x00);    while(!LL_SPI_IsActiveFlag_RXNE(SPI1));    data1[1] = LL_SPI_ReceiveData8(SPI1);        CS0_H;        LL_USART_TransmitData8(USART1,data1[3]);    while(!LL_USART_IsActiveFlag_TXE(USART1));        LL_USART_TransmitData8(USART1,data1[2]);    while(!LL_USART_IsActiveFlag_TXE(USART1));        LL_USART_TransmitData8(USART1,data1[1]);    while(!LL_USART_IsActiveFlag_TXE(USART1));

img

img

Confirmed chip power supply , Confirm whether the wiring is connected correctly , I really don't know what's going on




Take the answer :

MD, To replace the MCU, The original MCUSPI voltage 5V, Switch to 32 Then become 3.3 Cause the chip not to recognize , No problem with the program


copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/02/202202041634019268.html

Random recommended