Documentation for “Zerocat Chipflasher” as of Tue, 11 Feb 2025 14:22:26 +0100
Repository:
Version: v2.1.1-0-7ab6f93df
Branch: master

../../firmware2/src/SPIflash.spin.terminal.html

Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
Version 1.00.78
Compiling...
../../firmware2/src/SPIflash.spin
|-ASCII.spin
|-blocksizes.spin
Done.
Program size is 4044 bytes

______________________________________________________________________________
********************************************************* File starts here ***
Zerocat Chipflasher --- Flash free firmware, kick the Management Engine.

Copyright (C) 2020, 2021, 2022, 2024, 2025  Kai Mertens 

File SPIflash.spin --- Provide flags, commands, methods to access selected SPI flash chips.

This file is part of Zerocat Chipflasher.

See end of file for terms of use.

******************************************************************************


# Interface Description

Object "../../firmware2/src/SPIflash" Interface:

PUB  init
PUB  set_record(n)
PUB  get_record : 
PUB  inc : 
PUB  dec : 
PUB  get_ID : 
PUB  id2record(testid) : 
PUB  CE : 
PUB  iscommand(cmdnum) : 
PUB  isvolatile : 
PUB  iswritable(ireg) : 
PUB  isotp(ireg) : 
PUB  isinfo(ireg) : 
PUB  get_size : 
PUB  isstatic(ireg) : 
PUB  ptr_bitnames(ireg) : 
PUB  ptr_names : 
PUB  pages : 
PUB  digits : 

Program:  1007 Longs
Variable: 1 Longs


# Loaded Objects



# Constants

 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# SPI Command Set M-bM-^@M-^? Flag Numbers (0..31) in second LONG

* Status Register Commands
 * Read Commands
* Program and Erase Commands
* Protection Commands
* NOP Flag
* Power and Identification Commands
* SPI Command Set0 M-bM-^@M-^? Basic Flag Register Template

    Atmel AT26DF Family does not provide XAB_RES and X90_REMS!
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# SPI Command Set, extended M-bM-^@M-^? Flag Numbers (32..63) in first LONG

* Status Register Commands
* Security on Macronix (MXIC)
* Security on Winbond
* Sector Protection on Atmel AT26DF Family
* Misc
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# SPI Command Bytes, as collected across multiple datasheets

* Basic Command Bytes, understood by all SPI flash chips
* Basic Command Bytes, understood by modern SPI flash chips
* SPI Command Byte 'Read JEDEC Device ID'
* SPI Command Bytes, found on Microchip SST25VF016B
* SPI Command Bytes, found on Macronix chips (MXIC)
* SPI Command Bytes, found on Atmel AT25DF/26DFxxx
* SPI Command Bytes, found on Winbond W25Q-types
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# SPI flash Database

* Number of Records in the Chip Database
* Default Record of the Chip Database
* Size of Record
* Record's String Sizes
* Record Offsets in Bytes
* Horizontal Tab
* Not Applicable
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# JEDEC_IDs



# Globals



# Functions

_________
PUB  init

 Initialize memory.

__________________
PUB  set_record(n)

 Set active record number.

__________________
PUB  get_record : 

 Get active record number.

___________
PUB  inc : 

 Increase record.

___________
PUB  dec : 

 Decrease record.

______________
PUB  get_ID : 

 Return JEDEC_ID of active record.

_________________________
PUB  id2record(testid) : 

 Lookup record for a given ID.

__________
PUB  CE : 

 Query CE command in respect to chip's capabilities,
 return N_A if no erase command is available

_________________________
PUB  iscommand(cmdnum) : 

 Check whether cmdnum is set in command set of current record.
 Return TRUE or FALSE.

__________________
PUB  isvolatile : 

 Return >is_volatile< register information for specified record.

________________________
PUB  iswritable(ireg) : 

 Return >is_writable< register bit information for specified record.

___________________
PUB  isotp(ireg) : 

 Return >is_otp< register bit information for specified record.

____________________
PUB  isinfo(ireg) : 

 Return >is_info< register bit information for specified record.

________________
PUB  get_size : 

 Return size of the chip of the specified record.

______________________
PUB  isstatic(ireg) : 

 Return >is_static< register bit information for the specified record.

__________________________
PUB  ptr_bitnames(ireg) : 

 Return pointer to start of indexed bitnames string for the specified record.

_________________
PUB  ptr_names : 

 Return pointer to start of names string for the specified record.

_____________
PUB  pages : 

 Return maximal number of chip pages, or N_A if not applicable.

______________
PUB  digits : 

 Return number of digits in respect to chip size for specified record.


# Data

* Struct CHIPSPEC: Collection of Chips
* CHIPSPEC Related Constants (See CON Block)
* CHIPSPEC Access Examples
* CHIPSPEC Record Template
* CHIPSPEC Records
    - unknown chip
    - EN25QH32
    - EN25QH64
    - AT26DF161
    - AT26DF321
    - AT25DF641
    - SST25VF016B
    - SST25VF080B
    - MX25L8005/MX25L8006E
    - MX25L1605D, MX25L1606E
    - MX25L3205D, MX25L3206E
    - MX25L6405D, MX25L6406E, MX25L6445E
    - MX25L12835E
    - W25X40
    - W25X64
    - W25Q16.V
    - W25Q32.V
    - W25Q64.V
    - W25Q128.V


******************************************************************************
Terms of Use:

Zerocat Chipflasher is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

Zerocat Chipflasher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with Zerocat Chipflasher.  If not, see <http://www.gnu.org/licenses/>.

************************************************************** End of File ***