Skip to main content
Topic: Problems updating firmware. (Read 12490 times) previous topic - next topic

Problems updating firmware.

Hello.
I've just received my Openbench Logic Sniffer from SeedStudio, and started playing with it.
After trying to get it running on Linux, I decided to try it on windows as it looked more polished. I downloaded the last cvs files from Gadget Factory and tried to sniff some serial ttl data (triggering on low transition). Nothing happened.
So I tried to update the FPGA ROM with the 1.03 package. The ROM update worked fine (it finished without errors and switched itself to user mode), with the 32x4k - internal ROM.
But now SUMP does not recognize the device (windows configures the serial port just after connecting it), giving an "Device not found" error when clicking on capture button (correct port is selected).
So I tried to update the firmware on the PIC, but the update procedure it's not working.
I tried using a jumper between PGC and PGD in the ICSP header (after soldering the pins) and connecting it to the usb, but the ACT LED is not lighting up as described.
Also tried using the -boot flag with the pump-loader.exe utility, (the status works fine, giving me HW:1, FW:0.1, Boot:255 and found correct flash chip), and I get the "pump switched to bootloader mode", but fw_update can't find the device.
I've seen that the default vid and pid of the bat scripts are 0x04D8 and 0xFC90, but if I look for the IDs of the serial port on the windows device manager, I get 0x04D8 and 0x000A, so I think that the bootloader mode is not working.
Any advice? I really want to star playing with it :)
Thanks.

Re: Problems updating firmware.

Reply #1
I'm not sure about the communication problem, but the Boot:255 concerns me. That basically says you don't have a bootloader installed. It's possible that it's damaged or missing from your chip, or maybe it didn't get programmed into any chips.

I looked back at the package we sent seeed, and it has the attached combined firmware/bootloader firmware to be used. I also got a debug screenshot (attached) that shows (some) production version is using the proper firmware with bootloader. I believe other people have reported upgrading successfully, so hopefully this isn't wide spread.
Got a question? Please ask in the forum for the fastest answers.

Re: Problems updating firmware.

Reply #2
So, the only way to fix it, will be programming the PIC with the combined firmware (or bootloader and then upload firmware), using ICSP, right?
Now I need to ask for a pickit or simillar from a friend, I just have AVR programmers :-)

Re: Problems updating firmware.

Reply #3
Yes, at the moment you'll need a pickit2, ICD2 or similar to reflash, but I'm going to try to get a Bus Pirate script made to program it in the future. I'm not sure the firmware is related to the communication issue. It could be though. Please let me know what you find.
Got a question? Please ask in the forum for the fastest answers.

Re: Problems updating firmware.

Reply #4
That will be great, as I have a bus pirate, and it seems that none of my friends has a pic programmer for the 18FxxJxx series. :P
The bus pirate already works with openocd, if it can work as ICSP for PIC, it will be a "killer tool"! :-)
Keep me updated!

Re: Problems updating firmware.

Reply #5
I had a similar problem - plugging the device into a different USB port and re-installing the INF file seems to have made it visible again

Re: Problems updating firmware.

Reply #6
I have more or less the same problems as xzakox.  Originally the client software said the device wasn't found.  I ran load_ROM.bat and loaded the 8kx16bit inside file.  The client started working at least far as pretending to capture and showing the flat waveforms (I don't have any cables hooked up).  I ran half a dozen capture runs, quit the client, restarted the client, and it still worked.

I then unplugged the board, waited 30 seconds or so, plugged it back in, and the client couldn't see it again.  After trying unplugging and replugging it a few times it started working again.  And it worked for the next 3 or 4 times I unplugged/replugged it.  Then for a few times it went back to device not found.  Then it started working again.

A few of the times it wasn't working pressing the reset button on the board would make it start working but most of the time it didn't make any difference.

Somewhere in the midst of troubleshooting I hooked a PicKit2 up to the board and sucked out the firmware. As shipped by Seeed the pic configuration word is: 07A6 0F5D 0863 0104  and the firmware in the board is the hex file attached to this message.  Not knowing what they should be it doesn't help me but maybe it'll help someone who knows what they're supposed to be.

Intermittent problems like this are the worst kind to find.  It's much easier to find the problem when it doesn't work all the time.

I have to get up in the morning so I'm going to bed but I wanted to make a quick post of what I've found so far.

Re: Problems updating firmware.

Reply #7
Something I found is:
Don't use a cheap USB HUB with the OLS. It seems I'm still without bootloader(but a pickit2 is on it's way here), but now I was able to capture some i2c data just connecting the OLS directly to one of the usb ports of my laptop, and not to the usb hub I have always connected to it.
Weird, but nice.

Re: Problems updating firmware.

Reply #8
I've had exactly the same problems as @Hank.  After some fiddling I managed to update both the firmware and the FPGA under windows, but then Sump couldn't see the OBLS at all under Windows.  I switched back to Solaris and at first it worked, now I've come back to it today I get exactly the same message from Sump on Solaris as I do on Windows, and the OBLS doesn't work.  The device is being seen by the OS fine when I plug it in, it's just Sump that can't talk to it:

May 14 12:33:30 grinah usba: [ID 912658 kern.info] USB 2.0 device (usb4d8,a) operating at full speed (USB 1.x) on USB 1.10 root hub: communications@1, usb_mid1 at bus address 2
May 14 12:33:30 grinah usba: [ID 349649 kern.info]    Microchip Technology Inc. CDC RS-232 Emulation Demo
May 14 12:33:30 grinah genunix: [ID 936769 kern.info] usb_mid1 is /pci@0,0/pci1179,1@1d,2/communications@1
May 14 12:33:30 grinah genunix: [ID 408114 kern.info] /pci@0,0/pci1179,1@1d,2/communications@1 (usb_mid1) online
May 14 12:33:30 grinah usba: [ID 349649 kern.info] usba:   no driver found for interface 1 (nodename: 'data') of Microchip Technology Inc. CDC RS-232 Emulation Demo
May 14 12:33:30 grinah usba: [ID 912658 kern.info] USB 2.0 interface (usbif4d8,a.config1.0) operating at full speed (USB 1.x) on USB 1.10 root hub: modem@0, usbsacm5 at bus address 2
May 14 12:33:30 grinah usba: [ID 349649 kern.info]    Microchip Technology Inc. CDC RS-232 Emulation Demo
May 14 12:33:30 grinah genunix: [ID 936769 kern.info] usbsacm5 is /pci@0,0/pci1179,1@1d,2/communications@1/modem@0
May 14 12:33:30 grinah genunix: [ID 408114 kern.info] /pci@0,0/pci1179,1@1d,2/communications@1/modem@0 (usbsacm5) online

Re: Problems updating firmware.

Reply #9
More data: on Windows I've uninstalled the driver and reinstalled it, the OBLS then shows up (COM3) but Sump can't talk to it.  The device ids seem to match up OK with the .inf file (I'm not a Windows expert) so I guess at least the USB part of the link is working.

Re: Problems updating firmware.

Reply #10
Found the problem - I rolled back through the PIC firmware all the way to 1.0, it made no difference.  it's the 1.03 "16ch/4k /inside" FPGA firmware that's hosed.  I've loaded up the "8ch/16k/inside" firmware and that seems to work fine.

Re: Problems updating firmware.

Reply #11
[quote author="ian"]
the attached combined firmware/bootloader firmware to be used.
[/quote]

Now that it's morning and I'm awake again I noticed Ian posted a copy of the firmware that they sent to Seeed.  I've downloaded it and used a PicKit2 to verify that the boards being shipped from Seeed (at least mine, received yesterday) have that exact firmware in them.

@alanbur - I've tried all three "inside" versions of the FPGA firmware and all three act the same.  Sometimes when the board is plugged in it works and sometimes the client says "device not found".  Even when the client can't find it the board can be put in upload mode and the FPGA upload software can talk to it and upload new FPGA code.  Since the board works some of the time I think it's being loaded into the flash ok but for some reason on some power ups either the fpga doesn't run or doesn't load the firmware properly.

The board wouldn't enumerate properly and come up as a serial port if the pic firmware wasn't loaded and running.  If a board didn't have the pic firmware loaded it wouldn't show up as a serial port.

Re: Problems updating firmware.

Reply #12
@hank, after a few more hours fiddling with it I agree with your analysis - I'm getting the same "sometimes it works, sometimes it doesn't" behaviour.  Some times a reset kicks it back into life, sometimes it doesn't.  Sometimes the samples look correct, sometimes they are complete garbage - especially with RLE enabled.  I'm seriously thinking about sending mine back.

Re: Problems updating firmware.

Reply #13
Hi alanbur, others - I'm really sorry you're having problems with the OLS. Jack and I are working full time to isolate and solve the issues.

It appears some of the recent bitstreams for the FPGA have errors that cause them not to respond. Also, some have reported problems if you plug it into hub instead of a USB port.

Just as a side note: the PIC firmware has not changed since the initial release, so there shouldn't be a reason to swap the PIC firmware from different packages for debugging purposes.
Got a question? Please ask in the forum for the fastest answers.

Re: Problems updating firmware.

Reply #14
I notice from the status output, it appears I am one of the lucky ones without a bootloader on my pic.  I saw that you said you about had the bus pirate able to do the upgrade, is that working yet?  Just trying to figure out how I will upgrade it, if/when I need to.

$ ./pump-loader.exe -status -p:COM14
PUMP loader
Opening serial port 'COM14' @ 921600 ... OK
Found PUMP HW: 1, FW: 0.1, Boot: 255
Found flash: ATMEL AT45DB041D
PUMP status: 9c