fx3 + gpif + ttyACM

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

Hi!

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?

sincerely,

Josef Sommerauer

0 Likes
1 Solution
abhinavg_21
Moderator
Moderator
Moderator
50 likes received 25 likes received 10 likes received

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

View solution in original post

0 Likes
4 Replies
abhinavg_21
Moderator
Moderator
Moderator
50 likes received 25 likes received 10 likes received

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

0 Likes
Anonymous
Not applicable

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...

0 Likes
Anonymous
Not applicable

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");     

        libusb_close((*pHandle));   

        return -1;   

    }

0 Likes

Hi,

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

Regards
Abhinav

0 Likes