Connecting RoboClaw 2x7A MotorShield to TK1 freezes Grinch

Hello,

I have the Tegra TK1 flashed with Grinch and I have been working on a project with ROS and Kinect and everything was going well so far.

I have installed Grinch following this tutorial:

I have now got a RoboClaw 2x7A MotorShield and whenever I connect this to the USB it freezes the OS until I disconnect it again.

I have tried connecting to Raspberry Pi2 and it works, also to a Windows 10 machine and it works, only on Tegra seems to freeze the system.

I tried connecting both directly and even through a USB hub but it always freezes the Linux completely.

I would appreciate any tips.

Thanks!

If you have a serial console it may show information not available when the rest of the system freezes. It’s just the DB-9 connector set to 115200, 8N1 (RTC/CTS flow control). I use this with gtkterm, or sometimes with minicom. If you run Windows, then PuTTY works.

Perhaps if you had a text terminal up running this command it might show something right before it freezes:

sudo tail -f /var/log/kern.log

It is also possible that after reboot the rotated log name would have info:

/var/log/kern.log.1

In the case of a directly connected keyboard (or alternatively through echos to “/proc/sysrq-trigger” under serial console) you may be able to use sysrq to explore causing an OOPS dump on purpose (this would be much more informative than just knowing the system freezes). See:
https://en.wikipedia.org/wiki/Magic_SysRq_key

An example might be if you had a directly connected keyboard and wanted to “more safely” reboot a locked system…should magic sysrq function, this key combination would reboot after setting partitions to read-only:

ALT-SYSRQ-s   # syncs the disk
ALT-SYSRQ-u   # remounts disks read-only
ALT-SYSRQ-b   # immediately reboots

Note from that URL that you can also do other things, such killing processes or causing register dumps on some architectures. You might see what is possible prior to connecting the device by sync and read-only mount, followed by seeing what happens when you do various kinds of debug dumps.

If you must use a serial console then you cannot run directly via keystrokes (it’d act on your host, not on the Jetson). Instead you can echo characters to “/proc/sysrq-trigger” and get the same result if serial console has survived. And of course if serial console has survived you might be able to find out what is going on without ever using magic sysrq keys, e.g., dmesg.

Hi Linuxdev,

Thanks very much for your response.

I have taken your advice and did the log tail:

$sudo tail -f /var/log/kern.log

I noticed the following:

[ 182.031888] usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 22 11:06:39 tegra-ubuntu kernel:
[ 182.031933] usb 1-3.3: Product: USB Roboclaw 2x7A
Dec 22 11:06:39 tegra-ubuntu kernel:
[ 182.043704] usb 1-3.3: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
Dec 22 11:06:39 tegra-ubuntu kernel:
[ 182.051648] usb 1-3.3: can’t set config #1, error -32
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.475727] usb 1-3.3: USB disconnect, device number 6
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.645942] usb 1-3.3: new full-speed USB device number 7 using tegra-xhci
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.646413] usb 1-3.3: Device not responding to set address.
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.867054] usb 1-3.3: New USB device found, idVendor=03eb, idProduct=2404
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.867070] usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.867078] usb 1-3.3: Product: USB Roboclaw 2x7A
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.867522] usb 1-3.3: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
Dec 22 11:06:53 tegra-ubuntu kernel:
[ 195.870341] usb 1-3.3: can’t set config #1, error -32

This has led me to make some experiments and in fact I realized that all the devices on my USB hub were crashing and not the actual Linux. I have made a test with another USB hub 2.0 with external power supply and this time the keyboard and mouse kept working and only the Motor Shield didn’t.

In the end I bought a new USB 3.0 Hub and finally everything has worked!

I am not sure why exactly it was crashing all the other USB devices with the old USB, perhaps it was consumption all the power to itself.

Thanks again.