Dumping flash won’t work

I am trying to flash my Toniebox with a CC3235.

I have a sop8 clamp, there I connected
PI:2 → FLASH:1 FUNCTION:CS;
PI:4 → FLASH:6 FUNCTION:SCK;
PI:5 → FLASH:5 FUNCTION:MOSI;
PI:6 → FLASH:2 FUNCTION:MISO

I am using a rp2040 board with serprog and flashrom with this command:
flashrom -p serprog:dev=/dev/ttyACM0:115200,spispeed=1M -r cc32xx-flash.bin
The output of flashroms just says it couldn’t find a EEPROM.

I also tied soldering little probe cables directly to the flash’s legs. But they didn’t do the trick for me either.

I am doing something wrong, apparently. Do have to connect the clamp of after booting or can it be on before?

Also I seems to have a ISSI IS25LP032 instead of LQ which is mentioned in the wiki. But idk if that is relevant or not.

@Stff0r you seem to have successfully flashed your CC3235 before. Did you do something special?

Please post a logfile. You may enable verbose logging.

I just says no EEPROM found. But I will post it later

Connect GND in addition:
PI:3 → FLASH:4 FUNCTION:GND

I have the same chip IS25LP032.

Only difference I see is that I connected GND pins.
But it’s a bit tricky with the clamp handling to have good contacts. I also needed more tries sometimes.

Just some thoughts:

  • What is your flashrom version?
  • pins are connected correctly (e.g. Pin 1, pin count counter-clockwise, …)?
  • box is powered?

I tried with the flashrom version 1.3.0 thats provided by Gentoo, but also compiled the latest commit off of their Github repo. So 1.4.0 + some extra commits.

Pin 1 is the one with the small dot, is that correct? If you look at the board like it’s built in, with the power connector at the bottom it’s the pin on the bottom right?

Box is powered.

You always have to reboot the box to try to read? I just fired up flashrom in a while loop and tried to get the connection to work

FWIW this is tho output from flashrom:

flashrom/builddir on  main [?] ✗ while :; do ./flashrom -p serprog:dev=/dev/ttyACM0:115200,spispeed=1M -r foo.bin; sleep 2; done
flashrom 1.4.0-devel (git:v1.2-1391-ga21be915) on Linux 6.6.12-gentoo-dist (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
serprog: Programmer name is "pico-serprog"
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0x00000000fef80000.
serprog: requested mapping GD25LQ255E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping GD25Q256D/GD25Q256E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping IS25LP256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping IS25WP256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25L25635F/MX25L25645G is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U25635F is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U25643G is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U51245G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MX66L51235F/MX25L51245G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MX66L1G45G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MX77L25650F is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q00A..1G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping N25Q00A..3G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping N25Q256..1E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q256..3E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q512..1G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping N25Q512..3G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MT25QL01G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MT25QU01G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MT25QL02G is incompatible: 0x10000000 bytes at 0x00000000f0000000.
serprog: requested mapping MT25QU02G is incompatible: 0x10000000 bytes at 0x00000000f0000000.
serprog: requested mapping MT25QL256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MT25QU256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MT25QL512 is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MT25QU512 is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping S25FL256L is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping S25FL256S......0 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping S25FL512S is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping W25Q256FV is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JV_Q is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JV_M is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JW is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JW_DTR is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q512JV is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping W25Q512NW-IM is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping XM25QH256C is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping XM25QU256C is incompatible: 0x2000000 bytes at 0x00000000fe000000.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.

I got this once after plugging the box into the power, but nothing consistent.

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
serprog: Programmer name is "pico-serprog"
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0x00000000fef80000.
serprog: requested mapping GD25LQ255E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping GD25Q256D/GD25Q256E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping IS25LP256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping IS25WP256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25L25635F/MX25L25645G is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U25635F is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U25643G is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U51245G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MX66L51235F/MX25L51245G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MX66L1G45G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MX77L25650F is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q00A..1G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping N25Q00A..3G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping N25Q256..1E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q256..3E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q512..1G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping N25Q512..3G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MT25QL01G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MT25QU01G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MT25QL02G is incompatible: 0x10000000 bytes at 0x00000000f0000000.
serprog: requested mapping MT25QU02G is incompatible: 0x10000000 bytes at 0x00000000f0000000.
serprog: requested mapping MT25QL256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MT25QU256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MT25QL512 is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MT25QU512 is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping S25FL256L is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping S25FL256S......0 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping S25FL512S is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping W25Q256FV is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JV_Q is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JV_M is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JW is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JW_DTR is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q512JV is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping W25Q512NW-IM is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping XM25QH256C is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping XM25QU256C is incompatible: 0x2000000 bytes at 0x00000000fe000000.
Found Generic flash chip "unknown SPI chip (RDID)" (0 kB, SPI) on serprog.
===
This flash part has status NOT WORKING for operations: PROBE READ ERASE WRITE
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
Read is not working on this chip. Aborting.

But only once. Idk if this is a coincidence.

Please use flashrom with -V and post the log.

Ok, the clamp thing is really tricky. I soldered five cables to the legs of the flash and I got this consistently now. I have to boot up the chip, then I can read like this once with the unknown SPI chip. (log below) After that every read ends in no EEPROM devices found.

(Maybe a bit too verbose, scroll all the way down)

flashrom/builddir on  main [?] ✗ while :; do ./flashrom -p serprog:dev=/dev/ttyACM0:115200,spispeed=1M -VVV -r foo.bin; sleep 2; done
flashrom 1.4.0-devel (git:v1.2-1391-ga21be915) on Linux 6.6.12-gentoo-dist (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
flashrom was built with GCC 13.2.1 20240113, little endian
Command line (5 args): ./flashrom -p serprog:dev=/dev/ttyACM0:115200,spispeed=1M -VVV -r foo.bin
Initializing serprog programmer
serprog: connected - attempting to synchronize
writecnt 8 wr_bytes 0
wrote 8 bytes
write successful
writecnt 1 wr_bytes 0
wrote 1 bytes
write successful
.readcnt 1 rd_bytes 0
read -1 bytes
readcnt 1 rd_bytes 0
read 1 bytes
readcnt 1 rd_bytes 0
read 1 bytes
writecnt 1 wr_bytes 0
wrote 1 bytes
write successful
readcnt 1 rd_bytes 0
read -1 bytes
readcnt 1 rd_bytes 0
read 1 bytes
readcnt 1 rd_bytes 0
read 1 bytes

serprog: Synchronized
serprog: Interface version ok.
serprog: Bus support: parallel=off, LPC=off, FWH=off, SPI=on
Warning: Automatic command availability check failed for cmd 0x08 - won't execute cmd
Warning: Automatic command availability check failed for cmd 0x11 - won't execute cmd
serprog: Requested to set SPI clock frequency to 1000000 Hz. It was actually set to 1000000 Hz
serprog: Programmer name is "pico-serprog"
serprog: Serial buffer size is 65535
serprog: Output drivers enabled
The following protocols are supported: SPI.
Probing for AMIC A25L010, 128 kB: master_map_flash_region: mapping A25L010 from 0x00000000fffe0000 to 0x00000000fffe0000
serprog_spi_send_command, writecnt=1, readcnt=3
RDID returned 0x14 0x28 0x50. RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
master_unmap_flash_region: unmapped 0x00000000fffe0000
Probing for AMIC A25L016, 2048 kB: master_map_flash_region: mapping A25L016 from 0x00000000ffe00000 to 0x00000000ffe00000
RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
master_unmap_flash_region: unmapped 0x00000000ffe00000
Probing for AMIC A25L020, 256 kB: master_map_flash_region: mapping A25L020 from 0x00000000fffc0000 to 0x00000000fffc0000
[...]
Probing for Zetta Device ZD25D40, 512 kB: master_map_flash_region: mapping ZD25D40 from 0x00000000fff80000 to 0x00000000fff80000
RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
master_unmap_flash_region: unmapped 0x00000000fff80000
Probing for Unknown SFDP-capable chip, 0 kB: spi_sfdp_read_sfdp_chunk: addr=0x0, len=2, data:
serprog_spi_send_command, writecnt=4, readcnt=3
 0x00 0x00
spi_sfdp_read_sfdp_chunk: addr=0x2, len=2, data:
serprog_spi_send_command, writecnt=4, readcnt=3
 0x00 0x00
Signature = 0x00000000 (should be 0x50444653)
No SFDP signature found.
Probing for AMIC unknown AMIC SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x00, id2 0x00
Probing for Atmel unknown Atmel SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for Eon unknown Eon SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for Macronix unknown Macronix SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for PMC unknown PMC SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for SST unknown SST SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for ST unknown ST SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for Sanyo unknown Sanyo SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for Winbond unknown Winbond (ex Nexcom) SPI chip, 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Probing for Generic unknown SPI chip (RDID), 0 kB: RDID byte 0 parity violation. compare_id: id1 0x14, id2 0x2850
Added layout entry 00000000 - ffffffff named complete flash
Found Generic flash chip "unknown SPI chip (RDID)" (0 kB, SPI) on serprog.
Probing for Generic unknown SPI chip (REMS), 0 kB: compare_id: id1 0x00, id2 0x00
Found Generic flash chip "unknown SPI chip (RDID)" (0 kB, SPI).
===
This flash part has status NOT WORKING for operations: PROBE READ ERASE WRITE
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to flashrom@flashrom.org if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
serprog_delay usecs=100000
serprog_delay used, but programmer doesn't support delays natively - emulating
Read is not working on this chip. Aborting.
serprog: Output drivers disabled

OK, flashrom version is the same as I had.
I also had the “unknown chip” message, but I could Read.

yes.

I did not reboot the box when connection failed, but on my side it was always the problem that the clamp was not sitting correctly.

Ok, so connection is fine now for sure. I use the correct pins and I soldered some cables on directly instead of using the clamp.

Hm no idea why this isn’t working for me.

The PI’s pins maybe? I use the pins in the second column on their repos site: https://github.com/stacksmashing/pico-serprog
So GP2 (the Pin that has “2” written next to in in the board) goes to flash pin 1.

I just found out there is more than one serprog implementation: https://github.com/kukrimate/pico-serprog
So which one did you use?

This looks like solder between Vcc and HOLD#/RST#
Maybe this causes your problems.
Even if there’s no electrical connection there could be some sort of capacitive coupling.

No, that’s just a white paint marking.
And it’s my picture and for me it is working :slight_smile:

I used this implementation. Pins from 2nd column is fine, but GP2 is not pin 2.
You should have used these 5 pins (#2 to #6):
grafik

Ah, I’m a bit dumb sometimes :sweat_smile:

Thanks. Yes that’s the pins I used.

@Schievel1 Did you ever succeed? I’m fighting with the CC3235.