Sam4s xplained pro dual usb problems - Raspberry Pi Forums


i have issue device using raspberry pi.

have sam4s microcontroller operates in remote area. running 1 program uses edbg chip interact pi on usb serial terminal can view on ssh. use openocd on pi reprogram sam4s using edbg cmsis-dap device. once reprogrammed sam4s has 2 usb interfaces pi: original edbg interface , cdc interface. used bit , programmed first program 1 usb interface.

issue in enumeration of usb interfaces after reprogramming program both used. edbg chip hosted ttyacm0, when device reprogrammed, cdc interface comes ttyacm1 expected. however, cdc interface comes ttyacm0 instead, kicking off edbg interface. when happens, reboot gets edbg back, in case edbg acm1 , cdc still acm0. okay, inconvenient. real problem reboot doesn't bring edbg , i'm left cdc interface , can't reprogram sam4s anymore.

i'd love input on possible explanations or solutions , happy provide other information useful.

i'd check usb functions , endpoints servicing linux character-device node. possible device ordering functions differently sometimes. use sysfs identify function being assigned each endpoint. e.g:

code: select all

$ ls -l  /sys/class/tty/ttyacm* lrwxrwxrwx 1 root root 0 sep 29 04:50 /sys/class/tty/ttyacm0 -> ../../devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.1/tty/ttyacm0 lrwxrwxrwx 1 root root 0 sep 29 04:50 /sys/class/tty/ttyacm1 -> ../../devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.3/tty/ttyacm1 lrwxrwxrwx 1 root root 0 sep 29 04:50 /sys/class/tty/ttyacm2 -> ../../devices/pci0000:00/0000:00:1d.7/usb2/2-5/2-5:1.9/tty/ttyacm2  $ ls -dl /sys/bus/usb/devices/usb2/2-5/2-5:1.{1,3,9}/ep*                                                          drwxr-xr-x 3 root root 0 sep 29 04:44 /sys/bus/usb/devices/usb2/2-5/2-5:1.1/ep_8a drwxr-xr-x 3 root root 0 sep 29 04:44 /sys/bus/usb/devices/usb2/2-5/2-5:1.3/ep_89 drwxr-xr-x 3 root root 0 sep 29 04:44 /sys/bus/usb/devices/usb2/2-5/2-5:1.9/ep_84 
on system shows device on bus 2, port 5, , has several functions 3 of providing ttyacm character devices, , use endpoints 8a, 89 , 84 respectively.

possible endpoints being numbered differently device when reprogrammed cause kernel , udev issue ttyacm* names in different order.


raspberrypi



Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'