Skip to content

Commit

Permalink
Update usage with latest hydra_spiflash_nor_dump.py with examples for…
Browse files Browse the repository at this point in the history
… Debian / Windows
  • Loading branch information
bvernoux committed Feb 16, 2024
1 parent d156961 commit 6ffa28c
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions contrib/hydra_spiflash_nor_dump/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
Script to dump SPI flash chips with Hydrabus, tested with Hydrabus hardware v1.0 and firmware v0.8 beta
Script to dump SPI flash chips with Hydrabus, tested with Hydrabus hardware v1.0 and firmware v0.8 beta or more

Based on https://github.com/hydrabus/hydrafw/wiki/HydraFW-Binary-SPI-mode-guide

Usage:

hydra_spi_flash.py dump <dump_file> <n_4k_sectors> <hex_address> [slow|fast]
hydra_spiflash_nor_dump.py [options] <command> [<args>]
options:
--com_port (/dev/ttyACM0 by default)
--spi (1 for SPI1 by default) or 2 for SPI2
command:
hydra_spiflash_nor_dump.py dump <dump_file> <n_4k_sectors> <hex_address> [--speed slow|fast|max]
Dumps n_4k_sectors into dump_file, starting at hex_address.
By default, it dumps in slow (320kHz) mode, choose fast to increase to 10.5 MHz.
hydra_spi_flash.py chip_id
By default, it dumps in slow (320kHz) mode, choose fast for 10.5 MHz or max for SPI speed 42MHz SPI1/21MHz SPI2.
hydra_spiflash_nor_dump.py get_chip_id
Prints chip idenfification (RDID).


This script requires Python 3.2+, pip3 install pyserial hexdump

Example Debian get_chip_id SPI1(default) with COM Port(default /dev/ttyACM0)
python hydra_spiflash_nor_dump.py get_chip_id

Example Debian dump SPI1(default) with COM Port(default /dev/ttyACM0) 100 sectors of 4K (400K) speed default(slow)
python hydra_spiflash_nor_dump.py dump dump.bin 100 0

Example Windows get_chip_id SPI2 with COM9
python hydra_spiflash_nor_dump.py --com_port COM9 --spi 2 get_chip_id

Example Windows dump SPI2 with COM9 100 sectors of 4K (400K) speed fast
python hydra_spiflash_nor_dump.py --com_port COM9 --spi 2 dump dump.bin 100 0 --speed fast

This script requires Python 3.7+, pip3 install pyserial

Author: Pedro Ribeiro <[email protected]>
Author: Jonathan Borgeaud <[email protected]>
Author: Benjamin Vernoux <[email protected]>

License: GPLv3 (https://choosealicense.com/licenses/gpl-3.0/)

Expand Down

0 comments on commit 6ffa28c

Please sign in to comment.