AnsweredAssumed Answered

Ad5757 from eval board doesn't answer

Question asked by ArturB on May 7, 2015
Latest reply on May 15, 2015 by ArturB

Hello,

 

I have evaluation board with AD5757 for two days. I would like to check that communication is working properly, so I want to read data from register without success. The second option is to turn on alarm led on the board by watchdog because of no communication.

I have no clue why it does not answer me. I checked communication twice with logic analyzer and once with oscilloscope.

 

Eval board is connected to Raspberry pi. You can see script, which I use to test communication.

As a summary I can say that I use 0x9C, 0x2F, 0x00 to enable watchdog for 200ms and then wait 2 seconds without communication.

Then I send 0x98, 0x00, 0x00 to read status register and afterwards I send no operation 0x1C, 0xE0, 0x00.

Could someone confirm that this sequence is the correct one please?

I can provide dump from logic analyzer if required.

If more details is necessary feel free to ask.

 

#!/usr/bin/python

 

import spidev

import RPi.GPIO as GPIO

from time import sleep

import sys

 

 

spi0=spidev.SpiDev()

spi0.open(0,0)

spi0.max_speed_hz=500000

spi0.mode = 1

 

GPIO.setmode(GPIO.BOARD)

 

GPIO.setup(7, GPIO.OUT)

GPIO.setup(11, GPIO.OUT)

GPIO.output(7, GPIO.HIGH)

GPIO.output(11, GPIO.HIGH)

 

sleep(0.1)

print spi0.xfer2([0x9C, 0x2F, 0x00])

sleep(2)

print spi0.xfer2([0x98, 0x00, 0x00])

print spi0.xfer2([0x1C, 0xE0, 0x00])

 

GPIO.output(7, GPIO.LOW)

sleep(0.01)

GPIO.output(7, GPIO.HIGH)

 

spi0.close()

GPIO.cleanup()

exit()

Outcomes