4 Replies Latest reply on Dec 17, 2018 2:28 AM by abhinavg_21

    fx3 + gpif + ttyACM



      I'm working on a project with the fx3. i use the gpif to program and get data from an fpga. i want to use a usbuart interface to communicate with the fpga and other peripherals. The device descriptor has following layout: 1 interface with 2 endpoints for gpif and 2 interfaces with 3 entpoints for uart (see image: https://pasteboard.co/HRqJ7OX.png)


      My Problem is: I can progamm the fpga over gpif but wenn i access the gpif endpoint to read data my ttyACMx commection vanishes without any log message in dmesg. I am restricted for in this project to linux.


      Anyone an idea why this happens and what i could do against it?




      Josef Sommerauer

        • 1. Re: fx3 + gpif + ttyACM

          Hi Josef,


          Could you please tell whether the USB-UART interface is working fine initially(before performing read operation on GPIF EP)?  How did you check when the ttyACM connection is gone? Once the UART is gone, is the GPIF EP are working as excepted? Please use "/var/log/syslog" to check the logs. For testing first disconnect the UART lines form FPGA and send some dummy data from the firmware over USB-UART interface. Check that data in serial terminal. This will help us to verify whether USB-UART interface is working fine.


          Thanks & RegardsAbhinav

          • 2. Re: fx3 + gpif + ttyACM

            Hallo Abhinav,


            die USB-UART is working fine before i access the gpif ep. to check that the ttyACM dev is available i keep minicom running. If minicom is not running and i just use ls /dev/tty*, i get the same behavior. in "/var/log/syslog" i get no message when the device vanishes...



            • 3. Re: fx3 + gpif + ttyACM

              I just found the source of my problem. I had following lines of code in my pc application


                  if(libusb_kernel_driver_active((*pHandle), 0) != 0 &&

                     libusb_detach_kernel_driver((*pHandle), 0) != 0) {    

                      printf("Device locked by kernel driver!\n");     


                      return -1;   


              • 4. Re: fx3 + gpif + ttyACM



                Great!! Now you can print some kernel info log in "if" block to check it.