|
Update:
I got past the issue of the device not being recognized (it was a stupid error on my part) I am now seeing something else. I can communicate with my device as a standard tty device and can issue commands over a terminal emulator. As a test I just wrote something in to internal RAM and made sure I could read it back. I now am unable to connect to the device with SAM-BA only. I have been trying in both Windows and linux, the Windows version just eats up RAM and CPU and does nothing. In linux I was actually able to do an strace and got the following output:
... open("/dev/ttyUSB0", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 5 fcntl64(5, F_SETFD, FD_CLOEXEC) = 0 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_STOP or TCSETSW, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_STOP or TCSETSW, {B115200 -opost -isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 -opost -isig -icanon -echo ...}) = 0 fcntl64(5, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl64(5, F_SETFL, O_RDWR|O_LARGEFILE) = 0 fcntl64(5, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) write(5, "N#\n", 3) = 3 ... ... ... read(5, "\n\r", 4096) = 2 ... ... ... write(5, "w400e0640,4#\n", 13) = 13 read(5, "\0\0\0\0", 4096) = 4 write(1, "Read device Chip ID at 0x400e064"..., 54) = 54 write(5, "w400e0740,4#\n", 13) = 13 read(5, "`\5\t(", 4096) = 4 write(1, "Read device Chip ID at 0x400e074"..., 54) = 54 brk(0x9705000) = 0x9705000 write(1, "-I- Found processor : at91sam3u1"..., 57) = 57 ... ... ... write(5, "S2007e800,8c8#\n", 15) = 15 write(5, "\374\37\10 9\360\7 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 2249) = 2249 close(6) = 0 write(5, "W2007e840,0#\n", 13) = 13 write(5, "W2007e848,3#\n", 13) = 13 write(5, "W2007e84c,4#\n", 13) = 13 write(5, "W2007e850,0#\n", 13) = 13 write(5, "G2007e800#\n", 11) = 11 write(5, "w2007e840,4#\n", 13) = 13 read(5,
And this is where it hangs. It would appear the device is no longer responding. It looks like its trying to send the start of the .bin file over xmodem, they first few bytes of the file are: FC 1F 08 20 39 F0 07 20 which is the "\374\37...\7 " in the write() above, it wrote a total of 2249 bytes, which is the entire length of the .bin file.
Does anyone know what that read() is waiting for, and why the sam3u1 is not responding to it?
-Kris
|