Post Reply 
HP30b flashed with WP31 no longer responding
01-12-2016, 01:03 AM
Post: #1
HP30b flashed with WP31 no longer responding
Hi all,

I successfully flashed a couple of HP30b's with the WP34 bin file in the past. I used a setup similar to that described in the article describing the use of an Arduino Nano. The calculator was powered from the 3.3V supply of a Sparkfun FTDI-based USB to Serial board, with the internal batteries removed. For safety, I had 330 ohm resistors in series with the Tx/Rx pins.

When I tried to do the same with a new HP30b and the WP31 bin file, the calculator was successfully erased and the file downloaded. The download time seemed a bit short at only 4 seconds, but MySamBa seemed to complete without complaint. The calculator would not power on though.

Subsequent attempts to flash the file again or use a WP34 file all failed because MySamBa could not connect to the calculator. I tried the usual steps of removing and reapplying power, restarting MySamBa, connecting Tx/Rx directly without the limit resistors, repeating the erase procedure and so on to no avail. I would think I've done enough to recover from an I/O pin lockup, and I couldn't have raised the Rx/Tx pins above Vcc.

At this point it looks as though the calculator is dead. A few questions for those more experienced; Is there a way to tell if the calculator is truly bricked? Could a corrupt bin file be responsible? Could a JTAG unit bypass the bootloader?

Given how hard it is getting to find a 30b calculator, I'd hate to abandon this guy without some attempt at recovery, assuming it is possible. Suggestions greatly appreciated (including buy one from Eric Smile ).

Thanks,
~ Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
01-12-2016, 09:01 AM
Post: #2
RE: HP30b flashed with WP31 no longer responding
Ok, buying one from Eric is always a good idea. Smile

OTOH, and since you mentioned you created some WP 34Ss already: do you own a WP 34S Owner's Manual v3.3 (pdf or hardcopy)? There's a troubleshooting guide included which should cure most of the troubles experienced so far.

d:-)
Find all posts by this user
Quote this message in a reply
01-12-2016, 12:44 PM
Post: #3
RE: HP30b flashed with WP31 no longer responding
(01-12-2016 01:03 AM)mfleming Wrote:  The download time seemed a bit short at only 4 seconds, but MySamBa seemed to complete without complaint. The calculator would not power on though.

The 4 seconds make me believe that the processor has failed in the middle of something. That doesn't look good.

(01-12-2016 01:03 AM)mfleming Wrote:  At this point it looks as though the calculator is dead. A few questions for those more experienced; Is there a way to tell if the calculator is truly bricked? Could a corrupt bin file be responsible? Could a JTAG unit bypass the bootloader?

A real JTAG connection (the pins are inside the case below the number plate area) might help. It can bypass the processor firmware and serial access. There is a sample open-ods configuration in the SF repository.

Good luck!

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-12-2016, 03:48 PM
Post: #4
RE: HP30b flashed with WP31 no longer responding
Thanks for that reference Walter. Fortunately I picked up the manual before embarking on these builds, so I'll work through the troubleshooting section. I hope that works!

Marcus, my JTAG experience to date has mainly been with Xilinx devices. However I do have an STM32 JTAG, and that appears to be supported by the Olimex ODS toolchain. That's far deeper down the rabbit hole than I planned to go with this project, but "In for a penny, in for a pound" as they say. I've seen references to soldering on the necessary connector, so hopefully I can at least answer the "Is it still alive" question.

If all else fails, there's still Option Eric!

Thanks for the advice,
~ Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
01-12-2016, 04:15 PM
Post: #5
RE: HP30b flashed with WP31 no longer responding
Mark, please let us know your further experience. Also we can only learn from it. Thanks in advance.

d:-)
Find all posts by this user
Quote this message in a reply
01-12-2016, 09:09 PM
Post: #6
RE: HP30b flashed with WP31 no longer responding
Here's an update on the "bricked" calculator problem.

A bit of testing indicates the wee beastie might still be alive. I started by following the checklist in the troubleshooting section of the manual. I used a DVM to ring out the traces between the Tx/Rx connector pads and JP5 & JP6, and checked the traces between the Vcc/Gnd pads and the battery connectors. All good. For full measure, I checked the LCD display and its ribbon connection.

The MODE command output for the COM port after MySamBa was started was the same as shown in the manual. After doing a Send File, the baud rate changed from 1200 to 115200, which I assume is correct for the flash utility. No luck with getting the calculator updated though.

I then checked the state of the Tx/Rx lines under different conditions and compared them to a working WP 34S. When power is first applied, the serial pins are at 0 Volts. Pressing the On button causes the two lines to go high. The lines remain high when the WP 34S is turned off. Pressing Reset causes the lines to go low to about 0.10 Volts as opposed to a flat zero. Turning the unit On again causes the lines to return high.

Since both calculators respond identically to power-on and reset conditions, I would assume there's something still ticking in the problem unit. If I had access to the lower address lines I could use a scope or logic analyzer probe to see if there is any activity. Perhaps the first successful transfer left a corrupt program image and that somehow interferes with the serial port, or else just causes the processor to halt.

Looks like the next step will be to attempt a JTAG connection. I'll update afterwards with the setup used and steps taken.

Stay tuned! Smile
~ Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
01-13-2016, 12:08 AM
Post: #7
RE: HP30b flashed with WP31 no longer responding
I ordered a Segger J-Link for this purpose. Unfortunately, I'm still awaiting delivery, so I can't confirm it works in this application. It should, though. There is a reduced-cost "EDU" version available for 50€, or you can take your chances with one of the Chinese clones.

David Brunell
Houston, Texas
Find all posts by this user
Quote this message in a reply
01-13-2016, 09:46 AM
Post: #8
RE: HP30b flashed with WP31 no longer responding
(01-13-2016 12:08 AM)quantalume Wrote:  I ordered a Segger J-Link for this purpose. Unfortunately, I'm still awaiting delivery, so I can't confirm it works in this application. It should, though. There is a reduced-cost "EDU" version available for 50€, or you can take your chances with one of the Chinese clones.

A company named OLIMEX makes a cheaper open-source software version of the ARM JTAG programmer that sells for only $43.17 (39.95 euros). It can be ordered from this web site:
https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY/
Find all posts by this user
Quote this message in a reply
01-13-2016, 03:11 PM
Post: #9
RE: HP30b flashed with WP31 no longer responding
(01-13-2016 09:46 AM)BarryMead Wrote:  A company named OLIMEX makes a cheaper open-source software version of the ARM JTAG programmer that sells for only $43.17 (39.95 euros). It can be ordered from this web site:
https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY/

I'm using a larger device from Olimex, so chances are high that this one will work.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-19-2016, 09:37 PM
Post: #10
RE: HP30b flashed with WP31 no longer responding
Thanks to both of you for the suggestions on JTAG units. I have the STLink v2 unit from STMicroelectronics to support development on one of their 8-bit processors, and it is around $20US - very reasonable. Olimex OpenOCD has a configuration file for it in the scripts directory.

I received my WP 31S User's Manual today, but alas no working 31S as yet. I have verified that I flashed my 30b with an invalid bin file (ouch!). I've added a dual-row header to the PCB and made the necessary nameplate cutout in the back to accommodate the JTAG ribbon connector. I downloaded the Olimex toolchain from their site (gcc version 4.5.1, OpenOCD version 0.6.1). Following instructions, I've tried to run OpenOCD in standalone mode using the CFG file from sourceforge and the STLink config file.

OpenOCD fails to run properly, first complaining that 'jtag' is not a valid command. With that line commented out it the fails complaining that the 'target create' command requires a '-chain-command' option, which happens to be present. So much for a quick, hassle-free solution to my problem!

I'm going to follow the suggestion to use SEGGER Embedded Studio posted on the Yagarto site in the hopes I can do a simple JTAG flash without having to burrow all the way down to Wonderland and master a new toolchain.

I found WP34sFlash somewhere, so I could try that on the serial port if recommended. As usual, suggestions, version requirements and so on are greatly appreciated.

Fingers crossed,
~ Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
01-19-2016, 10:22 PM
Post: #11
RE: HP30b flashed with WP31 no longer responding
Try my config file in the repository. It should do the trick if the jtag probe works properly.

Or follow the instructions for the serial flash procedure thoroughly: Make sure that the flash is erased by shorting the erase pin and Vdd while pressing the on button to turn the processor on. Then push on again and try MySamba.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
01-19-2016, 10:36 PM
Post: #12
RE: HP30b flashed with WP31 no longer responding
Thanks Marcus,

I used the at91saml128.cfg and the at91saml128-program-flash.cfg separately. With at91saml128.cfg the openocd-0-6.1.exe program failed on line 14 (jtag command and 19 (target create) leading me to suspect that there are missing environment settings that are supplied by the Olimex toolchain. I'm using Windows 7, 64-bit OS for this work.

I have a nearly complete pogo-pin based rig that should make it easier to follow your second suggestion. In particular, no more holding a jumper across the erase pins while simultaneously trying to push a paperclip into the reset hole and press the On button without the power supply alligator clips popping off the battery terminals. Smile

Will give it a try soon...

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
01-20-2016, 01:42 AM
Post: #13
RE: HP30b flashed with WP31 no longer responding
Oh frabjous day! Callooh! Callay!

Well, enough of the Lewis Carroll. I hold in my hands a working WP 31S awaiting keyboard stickers (A task for tomorrow so as not to ruin a perfectly fabulous day by putting them on crooked or something). I also managed to resuscitate a WP 34S I thought I ruined whilst trying to connect serially to the emulator via an FTDI cable. The solution to my original problem ended up being the pogo-pin programmer assembly.

On reflection, my earlier jury-rigged setup was a disaster waiting to happen and an outright miracle it succeeded in flashing two previous calculators (poor signal and power connections, a real "No duh!" problem source). The pogo-pin assembly currently lacks the spring clip to hold the assembly to the calculator body. Some electrical tape to hold the assembly in place and light thumb pressure was all that was needed to get MySamBa to reflash the units.

Well, in embedded development the old saying is; The shortcut is the longest way around. Best to spend the extra time putting together a well built test rig. I'd still like to get the JTAG approach working though, since it's a good solid connection and the JTAG unit automatically matches I/O lines to the target voltage. Perhaps then I can play with the various branches and variations available.

For anyone interested, I used Mill Max spring pins (P/N 0914-0-15-20-77-14-11-0) from Newark Electronics (they partner with element14 in Europe). The pins have a short body (0.37"/9.4mm) and a long throw (0.1"/2.3mm). The PCB termination end of the pin fits snugly into a 2x3 ribbon cable header. The 2mm header and 1mm ribbon are also available from Newark.

Thanks to everyone for responding, I do appreciate the help. I look forward to the next re-purposed host, if any. Perhaps an HP 17bII+ or 35s with a custom replacement PCB?

Who knows,
~Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
01-20-2016, 08:15 AM
Post: #14
RE: HP30b flashed with WP31 no longer responding
(01-20-2016 01:42 AM)mfleming Wrote:  Oh frabjous day! Callooh! Callay!

Congratulations, Mark!
Maybe I should emphasize the importance of good connections a bit more in the Troubleshooting Guide.

Quote:I look forward to the next re-purposed host, if any. Perhaps an HP 17bII+ or 35s with a custom replacement PCB?

Who knows

Some may. An HP-35S will most probably not be repurposed since its production ceased many months ago. Thus, such a project would replace the HP-30b supply problem by ... ummh ... something worse IMHO.

d:-)
Find all posts by this user
Quote this message in a reply
01-20-2016, 03:55 PM
Post: #15
RE: HP30b flashed with WP31 no longer responding
Quote:Maybe I should emphasize the importance of good connections a bit more in the Troubleshooting Guide.
And this confirms the observation in the manual that no one has ever damaged a calculator by flashing it. There are however, ways to make it seem so!

Quote:An HP-35S will most probably not be repurposed since its production ceased many months ago.
Ai! First the 50g, now the 35s?!? Guess I should put a price watch on the calculator at Best Buy Sad

Don't get me wrong, I like the Prime, but...
~Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
01-20-2016, 09:47 PM (This post was last modified: 01-20-2016 10:25 PM by matthiaspaul.)
Post: #16
RE: HP30b flashed with WP31 no longer responding
(01-20-2016 03:55 PM)mfleming Wrote:  
Quote:Maybe I should emphasize the importance of good connections a bit more in the Troubleshooting Guide.
And this confirms the observation in the manual that no one has ever damaged a calculator by flashing it. There are however, ways to make it seem so!
From the electrical point of view it is quite easily possible to permanently damage the calculator during flashing in two possible scenarios:

- ESD (as an internal port, the flash port does not have any dedicated ESD protection as it would be a design requirement for any user-accessible ports, so touching one of the wires while being charged can be sufficient to kill the I/O port already)

- leaving (almost) exhausted batteries in the calculator while flashing the calculator through one of the cheaper flashers not adjusting the logic levels to the device's VCC (that is, virtually all flashers except for "high-end" ones). (The typical scenario would be a flasher operating at 3.3V and batteries with less than 3.0V). This will easily overload the clamping diodes in the processor's I/O port. This problem can be avoided either by removing the batteries while flashing (requires the calculator to be powered externally through the flash port), by inserting fresh batteries before flashing, or by adding large enough series resistors into the data lines (which may have other downsides).

Obviously, none of this was the reason for your original flashing problems. I guess, in most cases, problems are caused by corrupted flash images, bad cable connections or an otherwise interrupted flash process all causing the calculator's firmware to "hang" after flashing. These problems should be fixable through JTAG programming. Still, it would be misleading to state that it is impossible to permanently damage the calculator during flashing.

Greetings,

Matthias


--
"Programs are poems for computers."
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)