Using FX2 CY7C68013 from and embedded BF548 controller

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Dear experts

   

I am experiencing problems communicating with a 68013 from a uClinux environment on a BF548 EZKIT board. I make use of libusb as the underlying layer. The board has a USB2.0 OTG controller which has been configured as host. I do not have access to the 68013 code as it is from a third party vendor who cannot change it. I have succesfully downloaded the code using a libusb port of fxload. When the controller switches into its new configuration, I try to do bulk reads from endpoint 84. With exactly the same code, I succeed on a Windows machine (using libusb-win32) and on a Suse Linux box. On the embedded board, the reads return a 1 byte 0 all the time. I know this points to inconsistencies on the hardware level - but I really dont know what to do anymore. Has anyone succeeded in getting FX2 bulk reads working in an embedded environment?

   

The USB descriptor after configuration is:

   

Dev #119: 1512 PIPE PROFILER v1.0 - MARINE ELECTRONICS 1512
  wTotalLength:         60
  bNumInterfaces:       1
  bConfigurationValue:  1
  iConfiguration:       0
  bmAttributes:         a0h
  MaxPower:             50
    bInterfaceNumber:   0
    bAlternateSetting:  0
    bNumEndpoints:      6
    bInterfaceClass:    255
    bInterfaceSubClass: 0
    bInterfaceProtocol: 0
    iInterface:         0
      bEndpointAddress: 81h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 01h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 02h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 84h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 86h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 88h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
 

   

The simplified program is as follows (after configuration - I use a usb_reset and usb_close after configuring):

   

 

   

dh = usb_open(dev);

   

   

#if

       

   

defined(LIBUSB_HAS_GET_DRIVER_NP)

   

#if

   

printf("Seeing if a driver has claimed the interface");

   

 

   

printf("interface %i already claimed by %s - will try detach",0,name);

   

 

   

printf("%s\n", usb_strerror());

   

 

   

}

   

 

   

defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)if (LIBUSBLOG_usb_get_driver_np(dh, 0, (char *) name, sizeof(name)) == 0) {if (LIBUSBLOG_usb_detach_kernel_driver_np(dh, 0) < 0) {return;}

   

res = usb_set_configuration(dh,1);

       

Also included are transaction logs using a usbmon program from the blackfin BF548 and Suse

   

   

#endif

   

#endif

0 Likes
0 Replies