FLASHPROG-CONFIG(8) 2024-11-03 FLASHPROG-CONFIG(8)

flashprog-config - read and write status and configuration registers of flash chips

flashprog config [get] <options> <setting>
flashprog config  set  <options> [--temporary] <setting> <value>

Where generic <options> are:

-p <programmername>[:<parameters>] [-c <chipname>]
[-V[V[V]]] [-o <logfile>] [-h]

flashprog-config is a utility for reading and writing status and configuration register bits of flash chips. Currently, it supports only SPI NOR chips.

You can specify one of get or set, or no operation which defaults to reading a setting.

get <setting>

Read and print the value of the given setting. See SETTINGS below.

set [--temporary] <setting> <value>

Write the given value to the setting. See SETTINGS and VALUES below.

When the --temporary option is provided, flashprog will attempt to write a temporary value that is not stored to flash. This requires special support by the flash chip for a volatile write status register command. The new value will be lost upon reset of the flash chip. Hence, it is futile to use this with external programmers that toggle power to the flash chip (e.g. Dediprog).

qe, quad-enable

SPI NOR flash chips often support muxing some of their pins (usually /WP and /HOLD) with additional i/o lines. This enables them to transfer four bits at once when the quad-enable bit is set.

false, true

The values false and true will be converted to 0 and 1 respectively.

natural numbers: 0, 1, ...

When natural numbers are given, the least-significant bits of their binary representation will be written to a setting.

All operations require the -p/--programmer option to be used (please see for more information on programmer support and parameters).

-p, --programmer <name>[:<parameter>[,<parameter>]...]

Specify the programmer device. This is mandatory for all operations. Please see the manual for a list of currently supported programmers and their parameters.

-c, --chip <chipname>

Probe only for the specified flash ROM chip. This option takes the chip name as printed by flashprog -L without the vendor name as parameter. Please note that the chip name is case sensitive.

-V, --verbose

More verbose output. This option can be supplied multiple times (max. 3 times, i.e. -VVV) for even more debug output.

-o, --output <logfile>

Save the full debug log to <logfile>. If the file already exists, it will be overwritten. This is the recommended way to gather logs from flashprog because they will be verbose even if the on-screen messages are not verbose and don't require output redirection.

-h, --help

Show a help text and exit.

--temporary

Try to use a volatile write status register command. See set under OPERATIONS above.

To read the quad-enable setting of the internal BIOS flash:

flashprog config -p internal quad-enable
or
flashprog config get -p internal quad-enable
To temporarily set the quad-enable bit of a chip connected to an FT4222H:
flashprog config set -p ft4222_spi --temporary quad-enable 1

flashprog exits with 0 on success, 1 on most failures but with 3 if a call to mmap() fails.

flashprog needs different access permissions for different programmers. See this section in the manual for details.

You can report bugs, ask us questions or send success reports via our communication channels listed here: https://www.flashprog.org/Contact.

flashprog is covered by the GNU General Public License (GPL), version 2. Some files are additionally available under any later version of the GPL.

Please see the individual files.

This manual page was written by Nico Huber and is derived from the manual. It is licensed under the terms of the GNU GPL (version 2 or later).

2024-11-03 flashprog-config-1.3