Post Go back to editing

AD74412RBCPZ unable to communicate with arduino(SPI)

I have being trying to communicate with AD74412 with SPI using arduino and STM32h723 development board no matter how hard I tried I am unable to receive any data from that AD74412 IC.

Datasheet says first we have to clear Alert status register bits and i did and in order to read something i have to use Readback select register and I am doing everything according to the datasheet I am not receiving any data at the output. And this sensor i cannot simply send dummy clocks and get the data it requires me to write the address of the register which i want to read inn Readselect register.

Is there something else I am missing here the PC based software seems to work fine but when i use arduino noting happens.

Kindly help me I am working some important project and also if there any library files available please so share me. I will be off loaded.

Parents
  • Hi Ankit,

    Can you please check if the Reset pin is pulled high in your setup? The GUI takes care of this as there is no pullup on the evaluation board. 

    Thanks,

    Bríde

  • you are right the reset was one of the issue after doing everything i found reset is not pulled high after  fixing that problem by pulling it up with 3K resistor I tries running the same program again but still it didn't work. and the Alert_pin is always low. and before fixing the reset issue it was always high. That makes things too hard i have no idea what's going i expect the alert pin to get low only when I make a CRC error. or some error while sending data but instead its always low.

  • Hi Ankit, 

    This is as expected. The Alert pin will assert low on power up as the part comes out of the Power on Reset cycle. 

    If you were able to read the Alert status register, you would see the "Reset Occurred" bit asserted. 

    Let's first confirm that the device is powered up fully. Can you confirm the following voltages (which can be measured using the test points on the board)

    1.  AVDD, AVSS, 
    2.  DVCC & IOVDD, 
    3.  REFIN
    4.  ALDO5V, DLDO1V8, ALDO1V8

    Can you also send a scope-shot of your SPI sequence? 

    I suggest a read from the ALERT_STATUS register:

    1. 1st frame: write 0x2E (address of ALERT_STATUS register) to READ_SELECT register (0x41)
    2. 2nd frame: a NOP command (0x0 data to 0x0 register) can be applied. the ALERT_STATUS data should be available on the SDO pin. 

    It would be good to confirm the SPI signals on the AD74413R board if possible. R13 - R16 are all on the SPI lines. 

    Thanks,

    Bríde

  • Thanks I will do as you say well i already did but this time I will make LDAC pin pull down and make sure ALERT and ADC_RDY pin are pulled up I am doing everything right but I am missing things somewhere.

    I will check all test points and is it normal to have -1.7 volt at charge pump pin the datasheet says trip level at -1.65 volt.

    ok I am going to test the board.....

  • I did what you were suggesting but still i get disappointments

    https://drive.google.com/drive/folders/13gOJE7H8Ngvkvx9IgB0vujCKdW39fmLP?usp=sharing

    refer this images.

    actually we have replaced the old chip with new one since the old chip for no reason it was shorting the IOVDD and DVCC(i think its dead) all the trouble begins with this new chip is there any bootloader kind of stuff for this chip.

    This board came to us for repair work but old chip worked fine with SDP-S control board but now we lost SDP-S board so we are working it out with arduino and STM32 boards.

    few minutes ago there told me there had replaced the chip a long time ago since then no one tested it  is this could be a source of issue???

  • I thing one of my reply is considered as spam i attached a link for my google drive to view the dso pics.

    what I said in previous reply was that even after following your instructions I am unable to solve the issue later in my office told me that the previous IC was blown and now there using new IC and there did not uses SDP-S controller board to check. I am the first person to work it with arduino. if the IC needs some kind of firmware or initial setup then that should be the issue i am facing, Is this IC really uses firmware or it requires special type of programming for the first time use????

    well i have attched the images directly with any URL links

  • Hi Ankit, 

    No, there is no firmware or bootloader on the AD74413R. You should be able to communicate with it directly. 

    Do you think there is a possibility that the board was also damaged previously? 

    Were you able to confirm all of the supply voltages listed in my previous message? 

    I guess the third picture that you shared is the SPI clock and SDI to the AD74413R? Can you confirm where you captured these plots? Was this on the AD74413R board (I want to be sure that the signals are getting to the board correctly). 

    If you can send me a clearer picture of the SCLK & SDI (also SDO & SYNC if you can!), I can try to confirm that the data frame is following the datasheet timing diagram correctly. All of the timing specifications listed on Table 15 of the datasheet must be met. 

    Thanks,

    Bríde

  • Thanks for your time the real culprit was IC (may be), we changed the IC and now its working fine.

    I will deal with the old IC later. but now I am running into another problem in voltage output mode I am getting 4.7 volt as output where as datasheet says 11v.

    should I continue here or I should Raise this as another Q&A discussion for this vout problem.

    how to close this discussion since SPI communication was successfully implemented.

    I will try to share a library file to control this IC on GITHUB will ADI give me gift for writing a library?  

  • Hi Ankit,

    I believe you can "Verify Answer" or "Suggest as Answer" in in the options under the "more" button. I don't think you need to close the conversation.

    If you like, you can paste your DAC question into a new question and we can follow it there. 

    In the meantime, have you made any progress with this issue? Can you confirm 

    • what is loaded to the CH_FUNC_SETUP register for the channel of interest (addresses 0x01 to 0x04).
    • what code is loaded to the DAC_CODE register for the channel of interest? (addresses 0x16 to 0x19).
    • what is connected between the I/OP and I/ON screw terminals?
    • have any alerts been triggered? (Read the ALERT_STATUS register, address 0x2E)

    Thanks,

    Bríde

  • Everything works fine with STM32 I checked everything Except for (Digital input, loop powered modes) till now everything works fine.

    I used both voltage output and current output by loading values inside DAC_CODE for all channels everything was perfect and even I can program it to get up to 25 mA.

    I connected RTD and even the LSB bits of ADC were stable this never happened with STM boards Sigma-Delta ADC is really a good.

    Everything was according to the datasheet Reset error and charge pump error. But I also saw CRC error CLK count (but was my fault only).

    I do had one problem actually two:

    problem 1:

          While using the module in current input mode a manual reset(while the current inputs are still connected) it makes the specific channel ADC misbehave the open circuit voltage of my current source is 21 volt I believe this high voltage manages to disturb the ADC and causes saturation errors too. because after reset channel enters high impedance mode. may be this IC is not made to handle 21 volt at channel input i saw 11 volt as max in datasheet pls let me know what could be the solution.

    problem 2:

    when I started working with arduino it worked as expected but then something terrible happened IC blew up after seeing the data sheet I found I am supposed to power the IC by connect GND first and then Vcc (for AVDD). but instead I connected Vcc first and my circuit blew up(NOTE: there was no polarity error). well I can not say its totally ADI fault our office made some changes to power supply section because of that I have to provide external 5v for LDO and 24 volt for AVDD. No fabricator is so dumb to do that so I think the external 5 volt somehow managed to blow the IC and now I feel my office engineers are too smart that there made me blow up the IC twice even last time the same fault happened and because of that I spent a weak exploding my head. but this time I saw spark which IC blew up.

  • Hello Ankit,
    I'm trying to connect the AD74413R (AD-SWIO 2 Click ) to an STM32F4, I want to configure one of the channels as voltage input or current input, I'm interested in how I can setup the module and read data from it. Can you help me please? Thank you. 

Reply Children
No Data