Trouble upgrading flash rom

A cheap logic analyzer. Get one for $50, including worldwide shipping. A collaboration between the Gadget Factory and Dangerous Prototypes.

Trouble upgrading flash rom

Postby mnenomic77 » Mon Aug 03, 2015 3:17 am

Hi I've just bought a Open Logic Sniffer via Seeed and the board appears to work with the supplied firmware (I only tested 1 channel). However, having read that the first thing to do is to update the firmware, I downloaded, compiled and ran the firmware update tools.

Unfortunately this didn't work and failed due to an error about an unknown flash rom. I've spent all day trying various different versions of the firmware uploading tools (I'm running Ubuntu 15.04) in order to see if they gave better results, unfortunately every version has the same result.

Eventually I discovered I could update the PIC firmware code without any errors by putting a jumper across the PGC and PGD pins, which starts the bootloader code. This worked fine, so now I have the latest PIC code, hoping that that might solve the issue.

Unfortunately I'm still getting the following output:

Code: Select all
$ ./ols-loader -p:/dev/ttyACM1 -t:115200 -status
Logic Sniffer ROM loader v0.3 (November 9, 2010)
Opening serial port '/dev/ttyACM1' @ 115200 ... OK
Found OLS HW: 1, FW: 3.0, Boot: 2
Error - unknown flash type (48 01 46 03)


I've even checked the part number of IC2 and it is a WinBond 25X40BVNIG and the specification says that the JEDEC device ID should be: Ef 12 30 13 but the PIC firmware is consistently reporting the 48 01 46 03 instead. Extra puzzling to my mind is that the FPGA is clearly being programmed with a valid bitstream or I wouldn't be able actually use the Java client successfully?

As a last resort I ran the tool with the "ignore_jedec" option which just proceed to print a lot of failure errors for each page (I tried a read and a write).

At this point I thought perhaps there were bad soldering joints or something to cause poor signal connections or stay capacitance so I had a quick attempt at making sure the chip was soldered on the board properly. But this didn't seem to make the slightest different.

So I'm stumped? Any ideas what to do now?

Thanks in advance,

Michael

P.S. The the github repository doesn't seem to include either the source code for the FPGA nor the source code for the PIC - kind of pointless being open source if the source code isn't available! To be fair I was able to eventually find the various bits and pieces on the forum in terms of downloadable zips but I have no idea if this the dame source code used to build the binaries?

And on a related topic is source files for the PCB available anywhere, I know there are PNGs of schematics etc. but they are not editable?

I did find some links refering to a Gadget Factory SVN server but I'm unable to connect to that server (can't post links here due to "looks spammy for new user" error), instead I just get a time out?
mnenomic77
Newbie
Newbie
 
Posts: 3
Joined: Mon Aug 03, 2015 2:46 am

Re: Trouble upgrading flash rom

Postby sre71 » Mon Aug 03, 2015 2:53 pm

Hi mnenomic77,

I'm bit in a hurry now and I'm not a Linux user.
Anyway, do you know this?:

viewtopic.php?f=23&t=7344

I guess you need to be ROOT user while using the upgrade tools.
Here are some instruction just in case you don't know them:

http://dangerousprototypes.com/docs/Log ... s_on_Linux

http://dangerousprototypes.com/docs/Var ... ic_Sniffer

http://dangerousprototypes.com/docs/Ope ... er#Updates

I believe the JEDEC is wrong due the lack in something during the upgrade, perhaps the jumper between PGC and PGD pins.
I'm not sure though, sorry.
Hoping that can help.

Regards,
sre71
sre71
Jr. Member
Jr. Member
 
Posts: 62
Joined: Sat Aug 06, 2011 3:29 pm

Re: Trouble upgrading flash rom

Postby dpropicweb » Mon Aug 03, 2015 9:49 pm

mnenomic77 wrote:Eventually I discovered I could update the PIC firmware code without any errors by putting a jumper across the PGC and PGD pins, which starts the bootloader code. This worked fine, so now I have the latest PIC code, hoping that that might solve the issue.


I'm guessing you didn't follow the instructions at: http://dangerousprototypes.com/docs/Log ... s_on_Linux ?
dpropicweb
Sr. Member
Sr. Member
 
Posts: 318
Joined: Thu Apr 22, 2010 5:44 am
Location: The LAN Downunder

Re: Trouble upgrading flash rom

Postby mnenomic77 » Tue Aug 04, 2015 6:25 am

Yes I followed those as a guide. Compiled the tools. They work. But the upgrade fails. See post.

Edit: Sorry should have been more clear, I've followed all the documentation I could find (to the letter except when it asked to access inaccessible websites like gadgetforge.gadgetfactory.net), but I get the same "unknown flash type" error which stops the upload of the FPGA core bitstream.

And only after that did I try things out of order to narrow down what was wrong before posting here, I was able to get the bootloader to allow me to upgrade the PIC code.

But I'm still getting the "unknown flash code".
mnenomic77
Newbie
Newbie
 
Posts: 3
Joined: Mon Aug 03, 2015 2:46 am

Re: Trouble upgrading flash rom

Postby mnenomic77 » Tue Aug 04, 2015 7:10 am

Thanks sre71 for the response, I'ld like to get to the bottom of it, but no pressure, if you'e busy you are busy :-)

Ultimately I'ld like to be able to place custom FPGA cores on the board (and maybe make some improvements?)

sre71 wrote:....

Anyway, do you know this?:

http://dangerousprototypes.com/forum/viewtopic.php?f=23&t=7344



Yes I saw that thread, I've followed the Linux instructions and compiled the latest version from the github repository but I'm still get those bytes read incorrectly from the flash rom.

I don't think it's a Linux software problem since the JEDEC id is consistently being read incorrectly and from examining the PIC source code the id is being read by the PIC code and sent to ols-loader code. Which gives me a thought I could step through the Linux code in a debugger and check that the bytes reported are coming from the device.

sre71 wrote:I believe the JEDEC is wrong due the lack in something during the upgrade, perhaps the jumper between PGC and PGD pins.
I'm not sure though, sorry.
Hoping that can help.

Regards,
sre71


Well it has always been wrong from my first attempt and well before ever placing the jumper to get the bootloader running. So don't think there was any "lack" in the upgrade. It looks like something is wrong with the board to me since the JEDEC id isn't being read correctly by the PIC firmware.

My next attempt would be to read/program the ROM directly but I need extra tools for that...
mnenomic77
Newbie
Newbie
 
Posts: 3
Joined: Mon Aug 03, 2015 2:46 am

Re: Trouble upgrading flash rom

Postby dpropicweb » Tue Aug 04, 2015 7:22 am

See: viewtopic.php?t=6762

Another Ubuntu user with the unrecognised flash problem. Curious that it is Ubuntu again... unfortunately no followup.
dpropicweb
Sr. Member
Sr. Member
 
Posts: 318
Joined: Thu Apr 22, 2010 5:44 am
Location: The LAN Downunder

Re: Trouble upgrading flash rom

Postby tayken » Sun Aug 09, 2015 2:12 pm

I remember always having some sort of problem with the update procedure under Linux. For updating I always used Windows after realizing this. Do you have access to a Windows machine? Also the inaccessible page is https://github.com/GadgetFactory/OpenBe ... ic-Sniffer now. Gadget Factory went under some reorganization so some of the links may be broken. Can you pull everything from this link and use ols-upgrader.sh script? You probably have to patch it first according to the instructions at http://dangerousprototypes.com/docs/Log ... s_on_Linux
User avatar
tayken
Developer
Developer
 
Posts: 1502
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Trouble upgrading flash rom

Postby tayken » Sun Aug 09, 2015 2:26 pm

mnenomic77 wrote:P.S. The the github repository doesn't seem to include either the source code for the FPGA nor the source code for the PIC - kind of pointless being open source if the source code isn't available! To be fair I was able to eventually find the various bits and pieces on the forum in terms of downloadable zips but I have no idea if this the dame source code used to build the binaries?

And on a related topic is source files for the PCB available anywhere, I know there are PNGs of schematics etc. but they are not editable?

I did find some links refering to a Gadget Factory SVN server but I'm unable to connect to that server (can't post links here due to "looks spammy for new user" error), instead I just get a time out?

It's a long story why the source code and HW files are not available. But I believe I had them somewhere, I'll try to find everything.
User avatar
tayken
Developer
Developer
 
Posts: 1502
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

bootloader file -- OLSv1-bootloader-v1-20MHz.hex

Postby gbl » Fri Aug 14, 2015 1:51 am

I lost/corrupted my OLS bootloader.

Can not find link for OLSv1-bootloader-v1-20MHz.hex file

Ready to do the rescue using my Bus Pirate.
Update the Bus Pirate FW.
http://dangerousprototypes.com/2010/06/ ... er-rescue/

Can someone send me link ?
gbl
Newbie
Newbie
 
Posts: 1
Joined: Fri Aug 14, 2015 1:43 am

Re: Trouble upgrading flash rom

Postby dpropicweb » Fri Aug 14, 2015 2:02 am

dpropicweb
Sr. Member
Sr. Member
 
Posts: 318
Joined: Thu Apr 22, 2010 5:44 am
Location: The LAN Downunder

Re: Trouble upgrading flash rom

Postby Bingo » Tue Aug 25, 2015 1:11 pm

I've been using this approach under linux

viewtopic.php?f=23&t=1654&start=90#p42557

/Bingo
Bingo
Newbie
Newbie
 
Posts: 24
Joined: Tue Apr 26, 2011 10:37 am

Re: Trouble upgrading flash rom

Postby nickandrew » Fri Oct 02, 2015 6:22 am

It took some time, but I now have a definitive answer to when the "Error - unknown flash type (48 01 46 03)" occurs, and why.

The error comes from the various firmware update tools which try to read the flash type, and instead of sending the flash type, the device sends its device ID again (these are the first 4 bytes from the 7-byte Get ID response). This happens because the OLS when in update mode, accepts 4-byte long requests and it has got out of sync.

The reason it got out of sync is that a process on your computer (probably ModemManager) has opened the /dev/ttyACM* device and sent one or more characters to it.

So one thing you should do is update your udev rules file to contain this:

Code: Select all
# Rules for Openbench Logic Sniffers. Creates a nice link to the ols
ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fc92", MODE="0666", SYMLINK+="OpenBenchLogicSniffer", ENV{ID_MM_DEVICE_IGNORE}="1"


The other thing you should do is upgrade to the latest firmware utility, the ols-fwloader ...

https://github.com/robots/ols-fwloader

I have recently modified this tool to fix some bugs and automatically resync the OLS during its device initialisation.

At this time, the GadgetFactory download "Latest Stable Release is Version 3.08" does not work for firmware upgrade under 64 bit Linux. The latest commits on github:

https://github.com/GadgetFactory/OpenBench-Logic-Sniffer/commits/master are more recent than 0308 but still do not work out of the box.
nickandrew
Newbie
Newbie
 
Posts: 20
Joined: Thu Jan 06, 2011 7:30 pm


Return to Open Bench Logic Sniffer