Skip to main content
Topic: Test Release 2.03 and 2.04 - SPI mode. (Read 37790 times) previous topic - next topic

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #15
Please see the status command in the upgrade overview. If you run status and get BOOT:255 then it is not installed.
http://dangerousprototypes.com/2010/05/ ... ers-needed
Got a question? Please ask in the forum for the fastest answers.

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #16
Hello,

Code: [Select]
Error while invoking application: null


This error message means that you do not have rxtx installed in the java instance that is first in your path.

Jack.

[quote author="laube"]
I have a programmer and have tested the new release. It works fine with the old java client and appears to be little bit faster than before.
I don't think that it is necessary to get even higher transfer speeds though, because the OLS doesn't have a lot of memory to dump.. with my setup it gets the data in < 1s.

Trying to run the new Java client with the command line
Code: [Select]
java -jar analyzer.jar
gives me the error:
Code: [Select]
Error while invoking application: null

dont know what that is supposed to mean..

files in folder:
[font=courier:]Verzeichnis von F:ProgrammeSUMP2.04TestRelease

26.05.2010  12:28              .
26.05.2010  12:28              ..
30.04.2010  14:39           124'927 analyzer.jar
25.05.2010  15:52             1'236 ChangeLog.txt
26.05.2010  12:28              firmware
25.05.2010  16:00               308 load_ROM.bat
25.05.2010  14:34           169'314 logic_sniffer.bit
25.05.2010  14:35           465'404 Logic_Sniffer.mcs
24.02.2010  16:49            33'022 pump-loader.exe
15.12.2006  11:36                30 run_java_client.bat
26.05.2010  12:58              jre1.6.0_14-b08
               7 Datei(en)        794'241 Bytes
               4 Verzeichnis(se),  3'490'840'576 Bytes frei[/font:]


Laube
[/quote]

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #17
@Sjaak
Attached is a screenshot of the test pattern

@wayoda
The Java client code checked into svn is the correct code, I made the changes 8 days ago with a non SPI bitstream.

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #18
I don't think the current SPI firmware supports the SPI send of 0x03 for the test pattern with a jumper, I just added that to SVN. But you can send it manually with a serial terminal.

I also added several small updates to the SVN version can we can roll into the new release:
*ADC configured for lower power use
*ADC on PROG_B pin used to measure 2.5volt power supply
*change to central variable for timers
*I've updated the non-pubic USB descriptor file

My to do list for the firmware, after we get the SPI working and handle the missing bootloaders:
* Improve SPI speed, especially on dumps by filling the buffer until the FPGA has no more data or the buffer is full.
* maybe add a r/w indicator signal to avoid missed bytes during bidirectional traffic
* move self-test to a separate function
* clean up the code, move to separate files
* eventually move to an open source USB stack. I don't think the one we hired out will ever be done, but I found LUFA today which has much of the work done. All that is needed is a custom hardware abstraction for the PIC USB peripheral. It's currently in progress.
Got a question? Please ask in the forum for the fastest answers.

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #19
i get a device not found when trying to update the pic firmware
does this mean that i dont have the bootloader installed (even though i have the firmware installed)
is there an updating procedure anywhere detailed ? (do we have to short pgc with pgd)

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #20
Hi,

I've got the SVN version of the diolan bootloader client to compile under Linux (ubuntu 10.04).

I just added string.h to osdep/lnxdefs.h:

   #include
   #include
   #include
   #include
   #include
   #include

   #include
   #include

and stdlib.h to osdep/osdep.h:

   /* Linux definitions */
   #include "lnxdefs.h"
   #include
   #include
   #include
   #endif /* (defined _WIN32 || defined _WIN64) */

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #21
@rajkosto - please check that you follow all the steps detailed in the upgrade guide:

http://dangerousprototypes.com/2010/05/ ... ers-needed

Run pump-loader with the -status flag to check the bootloader. If you still have a problem connecting but the bootloader is installed, please let me know.
Got a question? Please ask in the forum for the fastest answers.

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #22
@Jack: thanks. I'll try it tonight and will post my findings. I would guessed it would be the same as the other testpattern so I would be scared to death when I saw this ;)

@ian: the usb HW is fairly simple to controll and for most pics the same. Goods news! Only the vid/pid thing to conquer ;)

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #23
@justinsm - is it possible to create a redistributable from your compile that we can include in the release package?

@Sjaak - after we have a open licensed firmware, I'm not worried about the VID/PID thing ;)
Got a question? Please ask in the forum for the fastest answers.

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #24
@rajkosto - it looks like you updated an old post instead of posting a new one, I almost missed it:

Quote
Found PUMP HW: 1, FW: 0.1, Boot: 255

This is the missing bootloader indication. Do you have a PIC programmer or Bus Pirate? These will be the easiest way to install a new bootloader. There is also someone close to you (your IP anyways) who can reflash it and have it back in a few days, please PM me for an address.
Got a question? Please ask in the forum for the fastest answers.

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #25
Hi,

I tried the 2.03 and 2.04 code, going through the whole upgrade process for both upgrades, and got the 'Device Not Found' error, using the precompiled 1.0 SUMP client on Windows XP.  I got the Java Client running and go the same 'Device not found' error.

Next I uploaded the PUMP.hex PIC code from the firmware-03-20Mhz.zip file, and reloaded the 2.04 Logic_Sniffer.mcs code for good measure.

Final state according to pump-loader status: Found PUMP HW: 1, FW: 0.3, Boot: 1

So, now I can connect to the Open Bench with either client, but while it is much faster, it's not really more reliable.  I ran a bunch of sniffs back-to-back:

With the Java client:
Number of successful runs before a failure (Device not found): 5,7,2,2,8,2,8,2,2  (37 successes, 9 fails, ~25% failure rate)

With the precompiled client:
Number of successful runs before a failure (Device not found): 7,10,0,47,27 (91 successes, 5 fails, ~5% failure rate)

So, I'm not sure what to conclude from this other than the latest PIC f/w works for me (and the others don't) and the Java client is faster, but less reliable.

-Crawford

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #26
Hmmmm,

I guess the big question is whether the Device not found failures are coming from the SPI communication between the FPGA and the PIC or from USB communication failures like people have been seeing with certain hubs...

Jack.

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #27
Seems like I had  the same problem as wayoda. After upgrading the firmware to 0.3 it worked again. It seem to work ervery time and not intermittingly like crawford (not tested much yet). Haven't had a go at the integrated testpattern, since upgrading took me longer then expected ;) I'm sorry but tonight i haven't got any time to do anymore testing, sorry.

When it didn't work I tried to do it with the hercules util but no reaction from the OLS, even tried extra leading 0x00, but nothing.

One thing can be confusing, all the filenames of the  bitstreams and firmwares have the same name. Could you please integrate it in the filename? (I know it is easily to forget and I do it also wrong sometimes ;)

For the record I have a transcript of the upgrade proces and running the various analyzer.jar's . (analyzer2 is the new one)


Code: [Select]
D:2.04TestRelease>dir
 Het volume in station D heeft geen naam.
 Het volumenummer is 00B2-CF12

 Map van D:2.04TestRelease

05/26/2010  06:56 PM    <DIR>          .
05/26/2010  06:56 PM    <DIR>          ..
04/30/2010  02:39 PM           124,927 analyzer.jar
05/25/2010  03:52 PM             1,236 ChangeLog.txt
05/26/2010  06:56 PM    <DIR>          firmware
05/25/2010  04:00 PM               308 load_ROM.bat
05/25/2010  02:34 PM           169,314 logic_sniffer.bit
05/25/2010  02:35 PM           465,404 Logic_Sniffer.mcs
02/24/2010  04:49 PM            33,022 pump-loader.exe
12/15/2006  11:36 AM                30 run_java_client.bat
               7 bestand(en)          794,241 bytes
               3 map(pen)  34,687,549,440 bytes beschikbaar

D:2.04TestRelease>pump-loader.exe -p:com8 -status
PUMP loader

Opening serial port 'com8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.1, Boot: 1
Found flash: ATMEL AT45DB041D
no input file specified !

D:2.04TestRelease>cd firmware

D:2.04TestReleasefirmware>dir
 Het volume in station D heeft geen naam.
 Het volumenummer is 00B2-CF12

 Map van D:2.04TestReleasefirmware

05/26/2010  06:56 PM    <DIR>          .
05/26/2010  06:56 PM    <DIR>          ..
02/24/2010  04:49 PM           257,536 fw_update.exe
05/18/2010  09:25 AM                68 OLS-program.bat
05/11/2010  09:38 AM            22,421 PUMP.hex
               3 bestand(en)          280,025 bytes
               2 map(pen)  34,687,549,440 bytes beschikbaar

D:2.04TestReleasefirmware>cat OLS-program.bat
fw_update -e -w -m flash -vid 0x04D8 -pid 0xFC90 -ix PUMP.hex
pause
D:2.04TestReleasefirmware>..pump-loader.exe -p:com8 -boot
PUMP loader

Opening serial port 'com8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.1, Boot: 1
Found flash: ATMEL AT45DB041D
PUMP switched to bootloader mode

D:2.04TestReleasefirmware>OLS-program.bat

D:2.04TestReleasefirmware>fw_update -e -w -m flash -vid 0x04D8 -pid 0xFC90 -ix
 PUMP.hex
U2IO flash erasing: DONE.
U2IO flash programming: DONE.
RESET Device
Operation successfully completed.

D:2.04TestReleasefirmware>pause
Druk op een toets om door te gaan. . .

D:2.04TestReleasefirmware>..pump-loader.exe -p:com8 -status
PUMP loader

Opening serial port 'com8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.2, Boot: 1
Found flash: ATMEL AT45DB041D
no input file specified !

D:2.04TestRelease>pump-loader.exe -write -p:com8 -wH:.Logic_Sniffer.mcs -run
PUMP loader

Opening serial port 'com8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.2, Boot: 1
Found flash: ATMEL AT45DB041D
Reading HEX file '.Logic_Sniffer.mcs' ... OK! (binary size = 169216)
Will write 641 pages
Page 0x0000 write ... OK
Page 0x0001 write ... OK
Page 0x0002 write ... OK
Page 0x0003 write ... OK
Page 0x0004 write ... OK
.. coffeebreak
Page 0x027d write ... OK
Page 0x027e write ... OK
Page 0x027f write ... OK
Page 0x0280 write ... OK
PUMP switched to RUN mode

D:2.04TestRelease>cd BFP_Logic_Analyzer_1.0

D:BFP_Logic_Analyzer_1.0>jre1.6.0_14-b08binjava -jat analyzer2.jar
Unrecognized option: -jat
Could not create the Java virtual machine.

D:BFP_Logic_Analyzer_1.0>jre1.6.0_14-b08binjava -jar analyzer2.jar
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
COM3
COM8
Device Controller found: org.sump.analyzer.devices.FpgaDeviceController
COM3
COM8
Device Controller found: org.sump.analyzer.devices.Hp16500DeviceController
Device Controller = FPGA Controller
Tool found: org.sump.analyzer.tools.I2CProtocolAnalysis
Tool found: org.sump.analyzer.tools.SPIProtocolAnalysis
Tool found: org.sump.analyzer.tools.StateAnalysis
Tool found: org.sump.analyzer.tools.UARTProtocolAnalysis
Attaching to: COM3 (115200bps)
Run started
Device ID: 0x0
Run aborted
java.io.IOException: Device not found.
        at org.sump.analyzer.devices.FpgaDevice.run(FpgaDevice.java:648)
        at org.sump.analyzer.devices.FpgaDeviceController.run(FpgaDeviceControll
er.java:546)
        at java.lang.Thread.run(Unknown Source)
Attaching to: COM8 (115200bps)
Run started
Device ID: 0x0
Run aborted
java.io.IOException: Device not found.
        at org.sump.analyzer.devices.FpgaDevice.run(FpgaDevice.java:648)
        at org.sump.analyzer.devices.FpgaDeviceController.run(FpgaDeviceControll
er.java:546)
        at java.lang.Thread.run(Unknown Source)

D:BFP_Logic_Analyzer_1.0>
D:BFP_Logic_Analyzer_1.0>cd ..2.03TestRelease

D:2.03TestRelease>dir
 Het volume in station D heeft geen naam.
 Het volumenummer is 00B2-CF12

 Map van D:2.03TestRelease

05/26/2010  08:01 PM    <DIR>          .
05/26/2010  08:01 PM    <DIR>          ..
05/25/2010  03:52 PM             1,236 ChangeLog.txt
05/26/2010  08:01 PM    <DIR>          firmware
05/25/2010  04:00 PM               308 load_ROM.bat
05/25/2010  11:12 AM           169,314 logic_sniffer.bit
05/25/2010  11:12 AM           465,404 Logic_Sniffer.mcs
02/24/2010  04:49 PM            33,022 pump-loader.exe
               5 bestand(en)          669,284 bytes
               3 map(pen)  34,686,582,784 bytes beschikbaar

D:2.03TestRelease>pump-loader.exe -write -p:com8 -wH:.Logic_Sniffer.mcs -run
PUMP loader

Opening serial port 'com8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.2, Boot: 1
Found flash: ATMEL AT45DB041D
Reading HEX file '.Logic_Sniffer.mcs' ... OK! (binary size = 169216)
Will write 641 pages
Page 0x0000 write ... OK
Page 0x0001 write ... OK
Page 0x0002 write ... OK
Page 0x0003 write ... OK
Page 0x0004 write ... OK
Page 0x0005 write ... OK
Page 0x0006 write ... OK
Page 0x0007 write ... OK
... yet another coffee
Page 0x027b write ... OK
Page 0x027c write ... OK
Page 0x027d write ... OK
Page 0x027e write ... OK
Page 0x027f write ... OK
Page 0x0280 write ... OK
PUMP switched to RUN mode

D:2.03TestRelease>cd BFP_Logic_Analyzer_1.0

D:BFP_Logic_Analyzer_1.0>jre1.6.0_14-b08binjava.exe -jar analyzer.jar
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
COM3
COM8
Device Controller found: org.sump.analyzer.devices.FpgaDeviceController
COM3
COM8
Device Controller found: org.sump.analyzer.devices.Hp16500DeviceController
Device Controller = FPGA Controller
Tool found: org.sump.analyzer.tools.I2CProtocolAnalysis
Tool found: org.sump.analyzer.tools.SPIProtocolAnalysis
Tool found: org.sump.analyzer.tools.StateAnalysis
Tool found: org.sump.analyzer.tools.UARTProtocolAnalysis
Attaching to: COM8 (115200bps)
Run started
Device ID: 0x0
Run aborted
java.io.IOException: Device not found.
        at org.sump.analyzer.devices.FpgaDevice.run(FpgaDevice.java:613)
        at org.sump.analyzer.devices.FpgaDeviceController.run(FpgaDeviceControll
er.java:524)
        at java.lang.Thread.run(Unknown Source)

D:BFP_Logic_Analyzer_1.0>
D:2.03TestRelease>.pump-loader.exe -p:com8 -status
PUMP loader

Opening serial port 'com8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.2, Boot: 1
Found flash: ATMEL AT45DB041D
no input file specified !

D:2.03TestRelease>
D:2.04TestReleasefirmware>fw_update -e -w -m flash -vid 0x04D8 -pid 0xFC90 -ix
 PUMP0.3.hex
U2IO flash erasing: DONE.
U2IO flash programming: DONE.
RESET Device
Operation successfully completed.

D:2.04TestReleasefirmware>cd BFP_Logic_Analyzer_1.0

D:BFP_Logic_Analyzer_1.0>jre1.6.0_14-b08binjava -jar analyzer.jar
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
COM3
COM8
Device Controller found: org.sump.analyzer.devices.FpgaDeviceController
COM3
COM8
Device Controller found: org.sump.analyzer.devices.Hp16500DeviceController
Device Controller = FPGA Controller
Tool found: org.sump.analyzer.tools.I2CProtocolAnalysis
Tool found: org.sump.analyzer.tools.SPIProtocolAnalysis
Tool found: org.sump.analyzer.tools.StateAnalysis
Tool found: org.sump.analyzer.tools.UARTProtocolAnalysis
Attaching to: COM8 (115200bps)
Run started
Device ID: 0x534c4131
11000000 00000000 00000000 00000000 00000000
11000001 00000000 00000000 00000000 00000000
11000010 00000000 00000000 00000000 00001000
10000000 00000000 00000000 00000000 00000000
10000001 11111111 00000001 11111111 00000001
Flags: 10
10000010 00000010 00000000 00000000 00000000
Run completed

D:BFP_Logic_Analyzer_1.0>cd 2.04TestRelease
D:2.04TestRelease>pump-loader.exe -p;com8 -status
PUMP loader

Opening serial port 'com8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.3, Boot: 1
Found flash: ATMEL AT45DB041D
no input file specified !

D:2.04TestRelease>pump-loader.exe -P:COM8 -wH:.Logic_Sniffer.mcs -write -run
PUMP loader

Unknown parameter '-P:COM8'

D:2.04TestRelease>pump-loader.exe -p:COM8 -wH:.Logic_Sniffer.mcs -write -run
PUMP loader

Opening serial port 'COM8' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.3, Boot: 1
Found flash: ATMEL AT45DB041D
Reading HEX file '.Logic_Sniffer.mcs' ... OK! (binary size = 169216)
Will write 641 pages
Page 0x0000 write ... OK
Page 0x0001 write ... OK
Page 0x0002 write ... OK
Page 0x0003 write ... OK
Page 0x0004 write ... OK
... something else then coffee
Page 0x027b write ... OK
Page 0x027c write ... OK
Page 0x027d write ... OK
Page 0x027e write ... OK
Page 0x027f write ... OK
Page 0x0280 write ... OK
PUMP switched to RUN mode

D:2.04TestRelease>cd BFP_Logic_Analyzer_1.0

D:BFP_Logic_Analyzer_1.0>jre1.6.0_14-b08binjava -jar analyzer2.jar
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
COM3
COM8
Device Controller found: org.sump.analyzer.devices.FpgaDeviceController
COM3
COM8
Device Controller found: org.sump.analyzer.devices.Hp16500DeviceController
Device Controller = FPGA Controller
Tool found: org.sump.analyzer.tools.I2CProtocolAnalysis
Tool found: org.sump.analyzer.tools.SPIProtocolAnalysis
Tool found: org.sump.analyzer.tools.StateAnalysis
Tool found: org.sump.analyzer.tools.UARTProtocolAnalysis
Attaching to: COM8 (115200bps)
Run started
Device ID: 0x534c4131
11000000 00000000 00000000 00000000 00000000
11000001 00000000 00000000 00000000 00000000
11000010 00000000 00000000 00000000 00001000
10000000 00000000 00000000 00000000 00000000
10000001 11111111 00000001 11111111 00000001
Flags: 10
10000010 00000010 00000000 00000000 00000000
Run completed
java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Thread.join(Unknown Source)
        at gnu.io.RXTXPort.removeEventListener(RXTXPort.java:814)
        at gnu.io.RXTXPort.close(RXTXPort.java:1039)
        at org.sump.analyzer.devices.FpgaDevice.detach(FpgaDevice.java:518)
        at org.sump.analyzer.devices.FpgaDeviceController.run(FpgaDeviceControll
er.java:559)
        at java.lang.Thread.run(Unknown Source)

D:BFP_Logic_Analyzer_1.0>


Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #28
@ian, attached is a dynamically linked fw_update build for 64-bit linux, I'll make a statically linked one too. 32-bit will take a little while, as I need to build a suitable 32-bit VM.

Also, I haven't tested that it works yet, which I'm about to do (or not, if my OLS lacks a bootloader)...

Re: Test Release 2.03 and 2.04 - SPI mode.

Reply #29
[quote author="justinsm"]
@ian, attached is a dynamically linked fw_update build for 64-bit linux, I'll make a statically linked one too. 32-bit will take a little while, as I need to build a suitable 32-bit VM.

Also, I haven't tested that it works yet, which I'm about to do (or not, if my OLS lacks a bootloader)...
[/quote]

My bet is that it won't work :)  As the bootloader acts as HID it gets bind with generic linux HID driver. You need to instruct libusb to unbind the driver for you. I have already mentioned this in earlier threads  http://dangerousprototypes.com/forum/index.php?topic=336.15

You need to patch the pic-bootloader.cpp
Code: [Select]
@@ -516,8 +518,16 @@
  // Valid device found
  found = true;
  devHandle = usb_open(dev);
+
  if (devHandle == NULL)
  break;
+
+ char buf[40];
+ int ret = usb_get_driver_np(devHandle, 0, buf, sizeof(buf));
+ if (ret == 0) {
+ usb_detach_kernel_driver_np(devHandle, 0);
+ }
+
  if (usb_claim_interface(devHandle, 0) < 0) {
  usb_close(devHandle);
  break;
Also i have had problems with some command sequences.

This should probably have thread on its own