Post Go back to editing

Reading EVAL-AD5933EBZ register using python

Category: Software
Product Number: EVAL-AD5933

Using PyUSB and libusbk 3.1.0.0 I was trying to read the register 0x9F.  The below are the snippets of the code. 

def __init__(self, vid=0x0456, pid=0xB203):
        self.dev = usb.core.find(idVendor=vid, idProduct=pid)

def read_reg(self, reg):
        try:
        # Mention which register to read
            self.dev.ctrl_transfer(
                0x40,   # Host → Device
                0xDE,
                0x000D,
                reg,
                None,
                timeout=3000
            )

            #Reading Data
            data = self.dev.ctrl_transfer(
                0xC0,   # Device → Host
                0xDE,
                0x000D,
                0x00,
                1,      # Read 1 byte
                timeout=3000
            )
            return data[0]

Output: Error: Read failed: [Errno None] b'libusb0-dll:err [control_msg] sending control message failed, win error: The semaphore timeout period has expired.\r\n\n'

It seems like the evaluation board is not sending data to the code. 

I would appreciate your guidance on the following:

  • Is this an issue related to driver configuration? If so, what driver do you suggest? 
  • If there are any specific initialization steps required before register reads?

Kindly let me know if any more information is needed. 

Best Regards,

Shiphi Abraham Thomas