Dangerous Prototypes

Other projects => Open Bench Logic Sniffer => Topic started by: varesa on September 03, 2013, 06:52:34 pm

Title: Can't update OLS
Post by: varesa on September 03, 2013, 06:52:34 pm
Now that I have managed to fix the bootloader, I am back to my original problem: I can't get it to update.

Code: [Select]
[root@acer2 ols-loader]# ./ols-loader -status -p:/dev/ttyACM0 
Logic Sniffer ROM loader v0.3 (November 9, 2010)
Opening serial port '/dev/ttyACM0' @ 921600 ... OK
Found OLS HW: 1, FW: 2.1, Boot: 2
Error - unknown flash type (48 01 46 02)

Code: [Select]
[root@acer2 fw_update]# ./fw_update -ver  -vid 0x04D8 -pid 0xFC90
fw_update Version: 0.2.0
U2IO BootLoader Version reading: FAILED.
Segmentation fault (core dumped)

Code: [Select]
[root@acer2 OLS_Upgrader]# ./ols-upgrader.sh 

...

Logic Sniffer ROM loader v0.3 (November 9, 2010)
Opening serial port '/dev/ttyACM0' @ 921600 ... OK
Found OLS HW: 1, FW: 2.1, Boot: 2
Error - unknown flash type (48 01 46 02)
Logic Sniffer ROM loader v0.3 (November 9, 2010)
Opening serial port '/dev/ttyACM0' @ 921600 ... OK
Found OLS HW: 1, FW: 2.1, Boot: 2
Error - unknown flash type (48 01 46 02)
Press any key to continue...

...

U2IO flash erasing: FAILED.
Device is not found.
Operation aborted.

Code: [Select]
[root@acer2 OLS_Upgrader]# ols_fwloader -f BOOT -n -P /dev/ttyACM0 -V -W -w PIC_firmware/OLSv1.firmware.v3.0.hex
Found OLS HW: 1, FW: 2.1, Boot: 2
Error - unknown flash type (48 01 46 02)
Is OLS in update mode ??
Unable to read Flash ID
Unable to open OLS

Code: [Select]
[root@acer2 OLS_Upgrader]#  dmesg

...

[68749.318714] usb 2-1.2: USB disconnect, device number 34
[68755.132925] usb 2-1.2: new full-speed USB device number 35 using ehci-pci
[68755.222412] usb 2-1.2: New USB device found, idVendor=04d8, idProduct=fc92
[68755.222422] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[68755.222428] usb 2-1.2: Product: Logic Sniffer CDC-232
[68755.222432] usb 2-1.2: Manufacturer: Microchip Technology Inc.
[68755.223487] cdc_acm 2-1.2:1.0: This device cannot do calls on its own. It is not a modem.
[68755.223521] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
[69023.732215] fw_update[28839]: segfault at ffffffffffffffff ip 0000003f17402c09 sp 00007fffcc7d9b90 error 5 in libusb-0.1.so.4.4.4[3f17400000+4000]
[69500.569512] fw_update[28978]: segfault at ffffffffffffffff ip 0000003f17402c09 sp 00007fff236bf940 error 5 in libusb-0.1.so.4.4.4[3f17400000+4000]

Code: [Select]
[esa@acer2 ~]$ lsusb
Bus 002 Device 035: ID 04d8:fc92 Microchip Technology, Inc. Open Bench Logic Sniffer
Bus 002 Device 031: ID 04d8:900a Microchip Technology, Inc. PICkit3
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1bcf:288a Sunplus Innovation Technology Inc.
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code: [Select]
[root@acer2 OLS_Upgrader]# uname -a
Linux acer2.ikioma 3.10.9-200.fc19.x86_64 #1 SMP Wed Aug 21 19:27:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@acer2 OLS_Upgrader]# rpm -q libusb
libusb-0.1.5-2.fc19.x86_64
libusb-0.1.5-2.fc19.i686

The board is v1.04 and I have programmed the PIC with svn trunk/PIC-firmware-dumps/PIC-firmware-dumps/OLSv1-DUMP-FW21BL2-16MHz.hex with a PICKIT3 after I screwed the bootloader up.

Any ideas?
Title: Re: Can't update OLS
Post by: varesa on September 03, 2013, 07:44:07 pm
It seems that by replugging the device I am able to atleast get the firmware updated:

Code: [Select]
[root@acer2 OLS_Upgrader]# linbin/ols-loader -p:/dev/ttyACM0
Logic Sniffer ROM loader v0.3 (November 9, 2010)
Opening serial port '/dev/ttyACM0' @ 921600 ... OK
Found OLS HW: 1, FW: 3.0, Boot: 2
Found flash: WINBOND W25X40

However I still can't get the bitstream to upload...

At first is starts ok:
Code: [Select]
[root@acer2 OLS_Upgrader]# linbin/ols-loader -write -erase -p:/dev/ttyACM0 -wB:FPGAROM/logic_sniffer_3.07-Demon-Core.bit -t:115200
Logic Sniffer ROM loader v0.3 (November 9, 2010)
Opening serial port '/dev/ttyACM0' @ 115200 ... OK
Found OLS HW: 1, FW: 3.0, Boot: 2
Found flash: WINBOND W25X40
Chip erase ... done :)
Reading BIN file 'FPGAROM/logic_sniffer_3.07-Demon-Core.bit' ... OK! (binary size = 169314)
Will write 662 pages
Page 0x0000 write ... (0x0000 0x0000)OK
Page 0x0001 write ... (0x0000 0x0001)OK
Page 0x0002 write ... (0x0000 0x0002)OK
Page 0x0003 write ... (0x0000 0x0003)OK
Page 0x0004 write ... (0x0000 0x0004)OK
Page 0x0005 write ... (0x0000 0x0005)OK
Page 0x0006 write ... (0x0000 0x0006)OK
Page 0x0007 write ... (0x0000 0x0007)OK
Then it starts doing this:
Code: [Select]
Page 0x00b5 write ... (0x0000 0x00b5)Checksum error :(
Page 0x00b6 write ... (0x0000 0x00b6)Checksum error :(
Page 0x00b7 write ... (0x0000 0x00b7)Checksum error :(
Page 0x00b8 write ... (0x0000 0x00b8)Checksum error :(
Page 0x00b9 write ... (0x0000 0x00b9)Checksum error :(
Page 0x00ba write ... (0x0000 0x00ba)Checksum error :(
Page 0x00bb write ... (0x0000 0x00bb)OK
Page 0x00bc write ... (0x0000 0x00bc)Checksum error :(
Page 0x00bd write ... (0x0000 0x00bd)Checksum error :(
Page 0x00be write ... (0x0000 0x00be)Checksum error :(
Page 0x00bf write ... (0x0000 0x00bf)Checksum error :(
Page 0x00c0 write ... (0x0000 0x00c0)Checksum error :(
Page 0x00c1 write ... (0x0000 0x00c1)Checksum error :(
Page 0x00c2 write ... (0x0000 0x00c2)OK
And ends with this:
Code: [Select]
Error sending dataError sending dataError sending dataPage 0x019a write ... (0x0001 0x009a)Error writing CMD to OLS
Error sending dataError sending dataError sending dataPage 0x019b write ... (0x0001 0x009b)Error writing CMD to OLS
Error sending dataError sending dataError sending dataPage 0x019c write ... (0x0001 0x009c)Error writing CMD to OLS
Error sending dataError sending dataError sending dataPage 0x019d write ... (0x0001 0x009d)Error writing CMD to OLS
Error sending dataError sending dataError sending dataPage 0x019e write ... (0x0001 0x009e)Error writing CMD to OLS
Error sending dataError sending dataError sending dataPage 0x019f write ... (0x0001 0x009f)Error writing CMD to OLS
Error sending dataError sending dataError sending dataPage 0x01a0 write ... (0x0001 0x00a0)Error writing CMD to OLS
Error sending dataError sending dataError sending dataPage 0x01a1 write ... (0x0001 0x00a1)Error writing CMD to OLS
Title: Re: Can't update OLS
Post by: varesa on September 07, 2013, 09:44:36 pm
I tried connecting the ols to a windows pc. I could not manage to get the default upgrade tool to work (or didn't bother), but I used a program called ols_winloader. At first it failed to program the FPGA because a pull-ups selftest failed (Defective unit?), but managed to program after I disabled the selftests.

After failing to get the status from ols-loader on the linux laptop the device again refused to boot into normal mode, and had to be once again programmed on the windows pc.

Now it usually works on the linux laptop, but atleast the "get metadata" button seems to randomly fail with about 10% chance of it printing "null". Sometimes it seems to get stuck in this non-working mode and a replugging helps...

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00912050656session_write_close ( )...(null):0
20.00942182232ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00942183008Database_MySQL->query( ).../DatabaseHandler.php:119
40.05242321728Database_MySQL->error( ).../Db-mysql.class.php:273