Hmm, this has ended in tears.
The backup seemed to run OK, apart from warning me the USB Blaster has a fixed frequency of 12000000.
However, when I tried to write the first block of the new firmware, after ages, it went like this, ending with a verification failure:
jtag> detectflash 0x20000000
Query identification string:
Primary Algorithm Command Set and Control Interface ID Code: 0x0002 (AMD/Fujitsu Standard Command Set)
Alternate Algorithm Command Set and Control Interface ID Code: 0x0000 (null)
Query system interface information:
Vcc Logic Supply Minimum Write/Erase or Write voltage: 2700 mV
Vcc Logic Supply Maximum Write/Erase or Write voltage: 3600 mV
Vpp [Programming] Supply Minimum Write/Erase voltage: 0 mV
Vpp [Programming] Supply Maximum Write/Erase voltage: 0 mV
Typical timeout per single byte/word program: 128 us
Typical timeout for maximum-size multi-byte program: 128 us
Typical timeout per individual block erase: 1024 ms
Typical timeout for full chip erase: 0 ms
Maximum timeout for byte/word program: 1024 us
Maximum timeout for multi-byte program: 4096 us
Maximum timeout per individual block erase: 16384 ms
Maximum timeout for chip erase: 0 ms
Device geometry definition:
Device Size: 4194304 B (4096 KiB, 4 MiB)
Flash Device Interface Code description: 0x0002 (x8/x16)
Maximum number of bytes in multi-byte program: 32
Number of Erase Block Regions within device: 2
Erase Block Region Information:
Region 0:
Erase Block Size: 8192 B (8 KiB)
Number of Erase Blocks: 8
Region 1:
Erase Block Size: 65536 B (64 KiB)
Number of Erase Blocks: 63
Primary Vendor-Specific Extended Query:
Major version number: 1
Minor version number: 3
Address Sensitive Unlock: Required
Process Technology: Bad value
Erase Suspend: Read/write
Sector Protect: 1 sectors per group
Sector Temporary Unprotect: Supported
Sector Protect/Unprotect Scheme: Bad value
Simultaneous Operation: Not supported
Burst Mode Type: Supported
Page Mode Type: 8 word Page
ACC (Acceleration) Supply Minimum: 11500 mV
ACC (Acceleration) Supply Maximum: 12500 mV
Top/Bottom Sector Flag: Bottom boot device
Program Suspend: Not supported
jtag> endian little
jtag> flashmem 0x20000000 DM3058_block0
Chip: AMD Flash
Manufacturer: AMD
Chip: S92GLxxxN
Protected: 0001
program:
flash_unlock_block 0x20000000 IGNORE
block 0 unlocked
flash_erase_block 0x20000000
flash_erase_block 0x20000000 DONE
erasing block 0: 0
flash_unlock_block 0x20002000 IGNORE
... lots more like this
block 22 unlocked
flash_erase_block 0x200F0000
flash_erase_block 0x200F0000 DONE
erasing block 22: 0
addr: 0x200FFFFE
verify:
error: flash program: addr: 0x200000D8
verify error:
read: 0x0000D822
expected: 0x0000FA62
I retried it, and got exactly the same verification failure.
I wonder if the Protected: 0001 had anything to do with it.
On the other hand, something was probably written, as the meter no longer boots.
I also have a PSOC Miniprog 3 which will do JTAG programming, so I'll see if I can use that instead, [update: no, I can't].
Any further insights gratefully received, thanks.